summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
AgeCommit message (Collapse)Author
2016-10-04Move core/fpdfapi/fpdf_font to core/fpdfapi/fontdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392773003
2016-10-04Move core/fpdfapi/fpdf_cmaps to core/fpdfapi/cmapsdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2391013002
2016-10-03Detect resursive loading of type3 font char to avoid infinite loopweili
The original way of detecting loops was passing a level parameter through various functions. This missed some cases which also lead to load type3 font char, for example, FindFont() may call CheckType3FontMetrics() which may eventually lead to LoadChar(). The new way is to store the char loading depth, and abort when the depth exceeds the max. BUG=chromium:651304 Review-Url: https://codereview.chromium.org/2384853002
2016-09-29Move core/fpdfapi/include to core/fpdfapidsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2376153004
2016-09-29Move core/fpdfapi/fpdf_parser/include to core/fpdfapi/fpdf_parserdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383543002
2016-09-29Move core/fpdfapi/fpdf_font/include to core/fpdfapi/fpdf_fontdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2375283003
2016-09-29Remove FX_BOOL from font_int.hnpm
It is not necessary. For some methods, bool can be used instead. For some other methods, the returned boolean is never used, so they can be void. Review-Url: https://codereview.chromium.org/2382803002
2016-09-23Remove FX_BOOL from cpdf_fontchromium/2872chromium/2871chromium/2870npm
In all cases, bool can be used instead without problems. Review-Url: https://codereview.chromium.org/2368693002
2016-09-23Clean CPDF_CIDFont a littlenpm
Remove C-casts, nits. Review-Url: https://codereview.chromium.org/2367743003
2016-09-15Rename dictionary set and get methodsdsinclair
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For. BUG=pdfium:596 Review-Url: https://codereview.chromium.org/2334323005
2016-09-01Fix CPDF_CIDFont::GlyphFromCharCode for fonts flagged with PDFFONT_SYMBOLICnpm
UnicodeFromCharCode should be tried even if the font is flagged as PDFFONT_SYMBOLIC. The result should be checked in case it's empty. This fixes some corpus tests that were being incorrectly rendered, as well as the bug below. A deps change will be required before landing this CL. BUG=chromium:591303 Review-Url: https://codereview.chromium.org/2300893003
2016-08-30Guard against overflow when calculating font weight.dsinclair
This CL uses the safe math libraries when calculating the font weight from the StemV value as very large values for StemV can cause the signed int to overflow. BUG=chromium:641418 Review-Url: https://codereview.chromium.org/2293633002
2016-08-15Get rid of FX_SMALL_RECT.thestig
Review-Url: https://codereview.chromium.org/2248463002
2016-08-15Use a std::vector in fpdf_font code.thestig
Review-Url: https://codereview.chromium.org/2248453002
2016-08-09Fix typos of the word outer.thestig
Review-Url: https://codereview.chromium.org/2226003003
2016-07-01Clean up parts of CPDF_CIDFont.thestig
Also remove some if statements that are always true/false. Review-Url: https://codereview.chromium.org/2094073002
2016-06-27Clean up some CPDF_Font subclasses.thestig
Review-Url: https://codereview.chromium.org/2093313002
2016-06-20Another round of fx_ge cleanup.thestig
- Clean up CFX_GEModule. - Remove duplicate #defines in fx_ge.h - Remove IsFontStyleFromCharCode() that always returns true. - Mark a FXTEXT_CHARPOS field as Mac only. Review-Url: https://codereview.chromium.org/2075333002
2016-06-07Get rid of NULLs in core/thestig
Review-Url: https://codereview.chromium.org/2032613003
2016-06-02Fix all the code which has duplicate variable declarationsweili
When there are duplicate variable declarations, the inner names shadow the outter ones. This is error prone and harder to read. Remove all the instances found by /analyze. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2027273002
2016-05-23Use unique_ptr in CPDF_CidFonttsepez
Review-Url: https://codereview.chromium.org/2003833003
2016-04-26Remove several IPDF_ interfaces and CPDF_RenderModule.dsinclair
This CL removes the interfaces: * IPDF_ObjectRenderer * IPDF_OCContext * IPDF_RenderModule * IPDF_PageModule The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves those up to the callers and removes the CPDF_RenderModule class. Review URL: https://codereview.chromium.org/1918323003
2016-04-14Avoid string allocs for CMap_GetString() return value.tsepez
StringC's are all that's needed here. Also CMap_GetString() and GetCode() are side-effect free, so remove calls where the value is not used. Review URL: https://codereview.chromium.org/1889003002
2016-04-11Use std::vector as internal storage for CPDF_ArrayWei Li
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which has non-standard APIs such as GetSize() returns int. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1867183002 .
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-29Rename GetElementValue() to GetDirectObject{By,At}().tsepez
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-25Replace CFX_DWordArray with CFX_ArrayTemplate<FX_DWORD>.Tom Sepez
First step to getting rid of FX_DWORD. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1832113003 .
2016-03-23Split core/include/fpdfapi/fpdf_resource.hdan sinclair
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places the classes into individual files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824033002 .