Age | Commit message (Collapse) | Author |
|
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id37333ba61ad0d395055acffd75d4d8be5eb2b3e
Reviewed-on: https://pdfium-review.googlesource.com/32911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: Ia3e758bbe5c445c3856f5215e900e02a16b4d7d7
Reviewed-on: https://pdfium-review.googlesource.com/32910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b
Reviewed-on: https://pdfium-review.googlesource.com/32187
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: chromium:831583
Change-Id: Idc980ef47cdd942bddc75d9b7fe4a56bdeacdc1a
Reviewed-on: https://pdfium-review.googlesource.com/30670
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802
Reviewed-on: https://pdfium-review.googlesource.com/29992
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: 806612
Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1
Reviewed-on: https://pdfium-review.googlesource.com/24410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Fix or optimize some ByteString::Compare() callers.
Change-Id: I0fde91afc3d17fe160b46d00a441ad05e56377e7
Reviewed-on: https://pdfium-review.googlesource.com/20851
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Use methods to match font information; cleanup some font code.
Change-Id: Ib99c1e466e56723cb5d264d49e1caf9bbbc0daed
Reviewed-on: https://pdfium-review.googlesource.com/15072
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This method duplicates the behaviour of the const [] operator and
doesn't offer any additional safety. Folding them into one
implementation.
SetAt is retained, since implementing the non-const [] operator to
replace SetAt has potential performance concerns. Specifically many
non-obvious cases of reading an element using [] will cause a realloc
& copy.
BUG=pdfium:860
Change-Id: I3ef5e5e5a15376f040256b646eb0d90636e24b67
Reviewed-on: https://pdfium-review.googlesource.com/10870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:727938
Change-Id: I85fe329c9d19c1dd1303279b0a9aade2fcc3211c
Reviewed-on: https://pdfium-review.googlesource.com/6814
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL uses the following algorithm for improving substitute font spacing (we
are assuming the text layout is horizontal):
* Calculate PDFWidth, the width that the PDF says the glyph should have.
* Calculate FTWidth, the width calculated by freetype for the glyph, using the
substitute font that we'll use to render it. Note that some embedded fonts have
PDFWidth == FTWidth + 1, so we consider that to be matching widths.
* If PDFWidth > FTWidth + 1 , move the x coordinate by the difference / 2 so
that the glyph is rendered in a more centered spot and the text looks better.
* If PDFWidth < FTWidth, transform the glyph horizontally by PDFWidth / FTWidth
so that the glyph gets compressed and does not overlap with surrounding glyphs.
Bug: chromium:431507
Change-Id: Ia378344253fabe44d93af4daab98bb3b7bca22de
Reviewed-on: https://pdfium-review.googlesource.com/6630
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL splits up font_int.h into files by classes. It also renames the
unittests to match the class being tested. Finally, it renames the ttgsubtable
files to match the class name.
Change-Id: I6187caa9e82d12b9a66e955113fe327d52042ae0
Reviewed-on: https://pdfium-review.googlesource.com/6090
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I88466943171f19259f84add69679741d44c8e123
Reviewed-on: https://pdfium-review.googlesource.com/5551
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I5d452ea907f4d243645ddae3512776096a827522
Reviewed-on: https://pdfium-review.googlesource.com/4872
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The chain of destructors may attempt to use m_pDocPage
after it has been set to null by the unique_ptr destructor.
Verify it is still present before using it from any code
that may be called from some other CPDF_ destructor.
Change-Id: I007160231d73feed85d90efc687d6da993653f96
Reviewed-on: https://pdfium-review.googlesource.com/4499
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL applies several fixes to the fallback font code.
- PDFium uses -1 to indicate that no glyph index was found, but freetype uses
0. In CPDF_TrueTypeFont, an index of 0 indicates a freetype failure, which
means we should try to find the glyph from a fallback font.
- Improve the fallback glyph calculation by going from original font charcode
to unicode to fallback font charcode.
- Consider the m_ExtGID on Mac when deciding the fallback.
Bug: chromium:665467
Change-Id: I2be34983e0d768d9a598043f84edd2d70f033c86
Reviewed-on: https://pdfium-review.googlesource.com/4055
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Pass in/out argument as a pointer.
Avoid pointless malloc just to copy in multibyte case. Then we can
avoid special-casing the single-byte case.
Change-Id: I3dd2d57e08ef6ad7b78ea38398b228fa41a9b3e6
Reviewed-on: https://pdfium-review.googlesource.com/3950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Pass stream argument to constructor; it feels like a
stream accessor should always be made from a stream rather
than passing one in after the fact.
Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44
Reviewed-on: https://pdfium-review.googlesource.com/3620
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Avoid writing |Type| in CollectionSize<Type>() so that index
type can change without rewriting conditions.
Change-Id: I40c94ca39148b379908760ba9b861114b88af7bb
Reviewed-on: https://pdfium-review.googlesource.com/3056
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Moved all the flags to CFX_Font. Explicitly stated which ones are valued
according to the PDF spec to avoid their values being changed.
Change-Id: Ib57593234a4b9b83ef1ad593d0396c64159f303f
Reviewed-on: https://pdfium-review.googlesource.com/2837
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Be suspicious of |new|. This removes some of the
easy cases.
Review-Url: https://codereview.chromium.org/2571913002
|
|
Removed unused methods, and GetCharSize no longer overrides.
Change-Id: I29384afb4d79cfd8e8b4ede4a0b52272020bfcd9
Reviewed-on: https://pdfium-review.googlesource.com/2031
Reviewed-by: ooo 11-24 -- 12-05 (dsinclair) <dsinclair@chromium.org>
|
|
Some changes were required to match underlying ctors
as invoked by the templated methods.
Many release() calls go away, a few WrapUniques() are
introduced to avoid going deeper into other code.
Review-Url: https://codereview.chromium.org/2510223002
|
|
Review-Url: https://codereview.chromium.org/2453163002
|
|
Review-Url: https://codereview.chromium.org/2409283002
|
|
FX_BOOL can be replaced by bool. Also replaced in a couple other places
so that Winbots pass.
Review-Url: https://codereview.chromium.org/2395803002
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392603004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386423004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392773003
|