summaryrefslogtreecommitdiff
path: root/core/fxge/ge/fx_ge_text.cpp
AgeCommit message (Collapse)Author
2016-08-17Split fx_font into multiple files, part 1.npm
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file. Review-Url: https://codereview.chromium.org/2246223002
2016-08-16Delete m_ExtHandle and RetainFont because they are not being used.npm
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
2016-08-15Avoid integer overflows in FXGE_GetGlyphsBBox().thestig
And also CFX_RenderDevice::DrawNormalText(). BUG=637192 Review-Url: https://codereview.chromium.org/2244613002
2016-08-10Move CFX_RenderDevice, CFX_FxgeDevice, and CFX_GraphStateData into their own ↵npm
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
2016-08-08Move CFX_ClipRgn and CFX_PathData into their own files.npm
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
2016-08-04Move CFX_GEModule into its own filenpm
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
2016-07-27Splitting fx_ge_fontmap.cppnpm
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
2016-07-25Remove FX_FONTCACHE_DEFINEtsepez
This macro isn't buying us anything and reduces transparency. Review-Url: https://codereview.chromium.org/2179953002
2016-07-21Bring pdfium file in sync with chrome, fix mac buildcaryclark
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
2016-06-22Remove some fx_dib functions with unused parameters.thestig
Review-Url: https://codereview.chromium.org/2075383002
2016-06-21Use FXFONT defines in place of integers.thestig
Fix nits along the way. Review-Url: https://codereview.chromium.org/2083943003
2016-06-21Move ifx_renderdevicedriver to a separate file to shareweili
Move ifx_renderdevicedriver class to its own file to share with multiple devices to reduce code duplication. Review-Url: https://codereview.chromium.org/2078783002
2016-06-14Make code compile with clang_use_chrome_plugin (part II)weili
This change contains files in core directory which were not covered in part I. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2060913003
2016-06-13Remove default arguments from IFX_RenderDeviceDriver.thestig
Review-Url: https://codereview.chromium.org/2059883004
2016-06-08update skiacaryclark
Update Skia to the last revision that passed the Chrome DEPS roll. This will help green the Skia tree so that future changes to Skia that break PDFium can be detected. R=rmistry@google.com,dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2042403004
2016-06-07Get rid of NULLs in core/thestig
Review-Url: https://codereview.chromium.org/2032613003
2016-06-06Remove unused PS generation code.thestig
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver. Also reland commit 2d63eaa. Review-Url: https://codereview.chromium.org/2019603002
2016-06-01Change CFX_Font::GetPsName() to return a CFX_ByteString.thestig
So everyone can avoid doing Byte to WideString conversions. Also remove CFX_GEFont::GetPsName() and deduplicate a couple of GetPsName() calls. Review-Url: https://codereview.chromium.org/2019173002
2016-05-26Remove default arguments in CFX_RenderDevice.thestig
Review-Url: https://codereview.chromium.org/2011943004
2016-05-19Clean up CFX_RenderDevice::DrawNormalText().thestig
Review-Url: https://codereview.chromium.org/1990583002
2016-05-17Don't use LCD antialiasing if Fontconfig doesn't support hintingthomasanderson
Some Freetype implementations (like the one packaged with Fedora) do not support hinting due to patents 6219025, 6239783, 6307566, 6225973, 6243070, 6393145, 6421054, 6282327, and 6624828; the latest one expires 10/7/19. This makes LCD antialiasing very ugly, so we instead fall back on NORMAL antialiasing. A before/after on Fedora: https://bugs.chromium.org/p/chromium/issues/detail?id=479400#c31 BUG=479400 Review-Url: https://codereview.chromium.org/1982263004
2016-05-13Make CFX_ByteString(const CFX_ByteStringC&) explicit.tsepez
Add missing helper function to CFX_ByteTextBuf to avoid the anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name "Make" to indicate there's an allocation going on in this case. Change some method arguments to take pre-existing ByteStrings where possible. Review-Url: https://codereview.chromium.org/1977093002
2016-05-04Return bool rather than bitwise-and for FX_BOOLtsepez
Investigate results of: git grep -ni 'return [(]*[a-z0-9_]* &[^&]' git grep -ni 'BOOL.*= [(]*[a-z0-9_]* &[^&]' Review-Url: https://codereview.chromium.org/1951653002
2016-04-29Subtract instead of adding the negation.thestig
Do more cleanup in modified files. Review-Url: https://codereview.chromium.org/1938613003
2016-04-12Remove ICodec_* Interfaces.dsinclair
All of the ICodec_* interfaces had a single implementation. This CL removes the interfaces and uses the concrete classes in their place. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1876023003
2016-04-11Fix integer issues leading to out of bounds access in fx_ge_text.cpp.ochang
- Using |-skew| to get positive index, which doesn't work when skew is INT_MIN - Incorrect logic when determining when to use |-skew| as an index. R=tsepez@chromium.org,weili@chromium.org BUG=chromium:601362 Review URL: https://codereview.chromium.org/1875673004
2016-04-08Rename both As{Byte,Wide}StringC() helpers to AsStringC().tsepez
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
2016-04-06Make wide strings use StringData templatetsepez
Shuffled the order of methods in fx_basic_wstring.cpp to match those in fx_basic_bstring.cpp. The way to review this patch is to diff those two files against each other. They are beginning to converge. Re-ordered some parameters in Concat() so that the string comes before its length. It feels wrong otherwise. Review URL: https://codereview.chromium.org/1846793002
2016-04-06Move include/fxcodec to fxcodec/includedsinclair
Review URL: https://codereview.chromium.org/1864153002
2016-04-06Move core/include/fxge to core/fxge/include.dsinclair
This CL is a straight move of the fxge includes into core/fxge/include. Review URL: https://codereview.chromium.org/1868533002
2016-04-04Support the device font cachecaryclark
Reuse the Skia typeface on sucessive text draw calls. This reduces the SKP size by 100x for some documents. Note that this does not use a smart pointer for the Skia typeface object. The downside of doing so is that it requires all clients that include fx_font.h to also have access to Skia. In this specific case, it is preferable to have a forward declared class to isolate Skia from the rest of PDFium. R=dsinclair,tsepez@chromium.org Review URL: https://codereview.chromium.org/1837113004
2016-03-29Code change to avoid signed/unsigned mismatch warnings.Wei Li
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-21Re-enable several MSVC warningsWei Li
Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 .
2016-03-14Move core/src/ up to core/.Dan Sinclair
This CL moves the core/src/ files up to core/ and fixes up the include guards, includes and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1800523005 .