Age | Commit message (Collapse) | Author |
|
The FX layer is spying on its private data, so make the job
of ref-counting it live in FX as well, instead of up a layer
at pdfapi.
Pre-cursor to making this private and passing the graph
state itself everywhere.
Review-Url: https://codereview.chromium.org/2314223002
|
|
- Rename fx_ge_font.cpp to cfx_font.cpp
- Deleted unused CONTRAST_RAMP_STEP in fx_ge_text.cpp
- Move CFX_Font definitions and auxiliary methods in fx_ge_text to cfx_font
- Remove extern "C", static, and underscore prefixes in new namespace
methods in cfx_font.cpp
Review-Url: https://codereview.chromium.org/2304493005
|
|
BUG=641333
Review-Url: https://codereview.chromium.org/2294183002
|
|
Update the calculation of the outlines bold strength to use a CheckedNum instead of an int.
BUG=chromium:639506
Review-Url: https://codereview.chromium.org/2296193002
|
|
Review-Url: https://codereview.chromium.org/2287313004
|
|
This reverts commit c10c23a2b1999b1cb0354fd4db9837dc63a3d833.
TBR=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2285283003
|
|
Review-Url: https://codereview.chromium.org/2292503002
|
|
Allows CFX_CountRefs to behave more like pointers.
Rename SetNull() to Clear() for consistency with other ptrs.
Change GetPrivateCopy() into MakePrivateCopy() with no return,
since the -> operators are clearer than getting an object pointer.
Review-Url: https://codereview.chromium.org/2283113002
|
|
Make use of existing ref count work rather than re-inventing it.
Review-Url: https://codereview.chromium.org/2281683002
|
|
Review-Url: https://codereview.chromium.org/2277323002
|
|
Remove friendship with CFX_Path
Pack members tighter on 64-bits.
Review-Url: https://codereview.chromium.org/2275883004
|
|
Added a vector of pointers to CFX_Fonts in the class CPDF_Font, so that
fallback fonts may be used. In CPDF_CharPosList::Load, the glyphs for each
character are calculated. When m_Font does not support a character, a fallback
font is selected and the character is rendered using that font. This meant
adding an attribute to FXTEXT_CHARPOS so it knows which font renders it.
Also, methods in fpdf_render_text.cpp now may need to call device drawing
methods multiple times because these only support one font at a time. In
CPDF_TextRenderer::DrawNormalText and in CPDF_TextRenderer::DrawTextPath, the
device drawing method is called as few times as possible by grouping contiguous
characters rendered by the same font. In
CPDF_RenderStatus::DrawTextPathWithPattern, drawing was already done one
character at a time, but precalculating CFX_FaceCache. Now, the face cache is
precalculated for all of the fallback fonts.
The list of fallback fonts does not include tha main font. Otherwise the list
would be of raw pointers to avoid double free problems. For now, the font
Arial is used as fallback. This should fix the issue of not seeing Latin
characters displayed when bad fonts are used. However, this should be improved.
Tested manually using the file in the bug, plus a font directory containing a
font that supports Hangul but not Latin. This font is chosen as the substitute
font, but Latin characters are now being rendered.
Design proposal: go/pdfium_fallbackfonts
BUG=pdfium:358
Review-Url: https://codereview.chromium.org/2276653002
|
|
Review-Url: https://codereview.chromium.org/2269203002
|
|
Moved ScopedFontTransform from fx_ge_text namespace to fx_font
Moved some arrays used by both CFX_Font and CFX_FaceCache from fx_ge_text to
inside CFX_Font class
Review-Url: https://codereview.chromium.org/2263623002
|
|
BUG=pdfium:562
Review-Url: https://codereview.chromium.org/2257313002
|
|
Review-Url: https://codereview.chromium.org/2260533002
|
|
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file.
Review-Url: https://codereview.chromium.org/2246223002
|
|
Recent Skia driver addition of 8 bit src / 8 bit dst workaround
needs to check for a nullptr bitmap.
R==dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2255763002
|
|
CFX_SubstFont::m_ExtHandle is never assigned a value different from nullptr.
Similarly, IFX_SystemFontInfo::RetainFont has two implementations.
Both of these return nullptr, so this method is not needed.
Review-Url: https://codereview.chromium.org/2252833002
|
|
And also CFX_RenderDevice::DrawNormalText().
BUG=637192
Review-Url: https://codereview.chromium.org/2244613002
|
|
Previously, Skia generated PDFs would only output one character at a
time, but now they output whole strings. Handle this case.
BUG=409472
Review-Url: https://codereview.chromium.org/2197553002
|
|
PDFs draw bitmaps with alpha by supplying an
image alpha mask along side the image color data.
The alpha mask may not be the same scale as the
image data. Skia doesn't have a direct mapping
for this draw call, but can come close by using
the internal SkCompositeShader class.
This scales the alpha mask to match the size of
the image data, then puts both in the composite
shader to draw.
There are more things to do:
- Allow Alpha8 or Gray8 to draw scaled to
a matching device (blit doesn't work today)
Temporary code marked with
a TODO implements this functionality.
- Refactor PDFium to allow SkComposeShader's
components to take a matrix.
The latter goal will defer drawing so that PDFium
doesn't resize the mask, discarding resolution,
before Skia has a chance to record it.
Additionally fix drawing text with a negative
font size.
R=reed@google.com,dsinclair@chromium.org,herb@chromium.org
Review-Url: https://codereview.chromium.org/2182763002
|
|
Review-Url: https://codereview.chromium.org/2240863002
|
|
When the source bitmap's width and height are large,
the multiplication could easily overflow a signed integer.
Change to use 'long long' type for calculation to avoid that.
BUG=chromium:635663
Review-Url: https://codereview.chromium.org/2240723002
|
|
Added methods to reduce duplicated code
Nit fixes
Review-Url: https://codereview.chromium.org/2239703003
|
|
files.
This is the third CL to separate fx_ge into classes, one per file.
All fx_ge.h includes had to be replaced with new includes
The method definitions for CFX_FxgeDevice were not moved to a single file.
These methods are defined in two folders different from fxge/ge, so they were left untouched for now.
Review-Url: https://codereview.chromium.org/2223213002
|
|
Review-Url: https://codereview.chromium.org/2226003003
|
|
There were several overflows detected by the PDF from the linked bug. This
Cl fixes up the base causes of each of them.
BUG=chromium:635473
Review-Url: https://codereview.chromium.org/2226023002
|
|
This is the second CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files. CFX_ClipRgn is moved to core/fxge/ge because it is only used in core/fxge. The header for CFX_PathData is left in core/fxge/include since it is used elsewhere.
Review-Url: https://codereview.chromium.org/2216853004
|
|
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files.
Review-Url: https://codereview.chromium.org/2217663002
|
|
Review-Url: https://codereview.chromium.org/2218433002
|
|
BUG=624514
Review-Url: https://codereview.chromium.org/2204773003
|
|
- Renamed header for CFX_QuartzDevice class
- Removed unused class CFX_WinBitmapDevice
- Split remaining fx_ge_win32 header
Review-Url: https://codereview.chromium.org/2197513004
|
|
Do some cleanup in the process.
BUG=629839
Review-Url: https://codereview.chromium.org/2190283003
|
|
The text matrix for Skia is still wrong.
The last fix allowed text to draw correctly when rotated,
but did not draw correctly when skewed.
With this edit, text draws correctly rotated, skewed
horizontally, skewed vertically, and rotated and skewed.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2189093002
|
|
Move CFX_FolderFontInfo, CFX_FontMgr, and CFX_FontMapper into their own
classes. There are namespaces in each of the new files, having methods
from the original namespace in fx_ge_fontmap, according to what each
class needs.
Review-Url: https://codereview.chromium.org/2185533006
|
|
This macro isn't buying us anything and reduces transparency.
Review-Url: https://codereview.chromium.org/2179953002
|
|
My initial guess for text rotation worked for scaled
but not skewed or rotated.
R=dsinclair@chromium.org,reed@google.com
Review-Url: https://codereview.chromium.org/2178623002
|
|
For the class owned member variables, use std::unique_ptr or
std::vector for memory management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2169793002
|
|
Add back one function which is only used by Skia code. And make a couple small
fixes.
Review-Url: https://codereview.chromium.org/2167383002
|
|
Use unique_ptr for class owned member variables. Also clean up some
style issues such as removing unused functions and casting to raw pointer.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2163103002
|
|
This permits PDFium to build on the Mac with Skia as the backend. It builds on Linux and Windows as well.
R=dsinclair@chromium.org,bungeman@google.com
Review-Url: https://codereview.chromium.org/1995003002
|
|
Move the singleton instances into their namespaces, and use
get()/getInstance() for uniform accesses.
Review-Url: https://codereview.chromium.org/2154843002
|
|
Use unique_ptr for class owned member variables, and remove unnecessary
or unused functions and member variable.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2149903002
|
|
This is sufficient to print text with GDI for PDFs generated by Chromium
and cannot print any arbitrary PDF. Text that cannot be printed will be
drawn as glyphs as before.
BUG=409472
Review-Url: https://codereview.chromium.org/2113563003
|
|
testing/corpus/fx/path/path_10_jd.pdf
sets the document to null. (It can't
be read at all by MacOS Preview.)
This causes the font cache to also
be null. In this case, get the font
cache from CFX_GEModule instead.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2128043004
|
|
The dash parameters where not copied; the copy
could point at random data and cause corpus
tests to hang when testing Skia.
PDFium measures text directly by calling FreeType.
Turn off hinting altogether in Skia so that drawn
text matches the metrics that PDFium measures.
Premultiply bits retrieved from images, and check
to see that the device bits are always
premultiplied.
Look for null graphics state and matrices.
R=thestig@chromium.org,dsinclair@chromium.org
BUG=pdfium:532
Review-Url: https://codereview.chromium.org/2120353004
|
|
Take the requested font weight and italicization into account when
searching for fonts. For example, for a font with the face "Arial" and a
weight of 700, search to see if "Arial Bold" is available.
BUG=530
Review-Url: https://codereview.chromium.org/2119983002
|
|
Review-Url: https://codereview.chromium.org/2112213002
|
|
Add checks to pass unit tests.
R=thestig@chromium.org,dsinclair@chromium.org
BUG=pdfium:525, pdfium:526, pdfium:527, pdfium:528, pdfium:529
Review-Url: https://codereview.chromium.org/2111553003
|