summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge/fx_ge_fontmap.cpp
AgeCommit message (Collapse)Author
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 .
2016-03-11Re-enable MSVC warning 4800 for compiling with chromium_codeWei Li
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
2016-03-08Reland "Fix chromium-style errors."Dan Sinclair
This reverts commit 594912241cd7d409b5f58a48ccffdc1904d844b2. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1769273002 .
2016-03-07Revert "Fix chromium-style errors."Dan Sinclair
This reverts commit c582c0ddfea8ba01c8449ed7841cdb33c12e0a98. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1769263002 .
2016-03-07Fix chromium-style errors.Dan Sinclair
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1772543003 .
2016-03-02Check that the names buffer is not empty before passing to GetNameFromTT.Tom Sepez
Due to implicit conversion if the names buffer is empty then nullptr will be passed to GetNameFromTT which blindly dereferences it leading to a NPD if an invalid font file is read. BUG=583037 Patch by forshaw@ R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1763493003 .
2016-02-25Use std::lower_bound() in a couple places.Lei Zhang
Do some cleanups along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1732223002 .
2016-02-17Banish CFX_ByteArray and CFX_WideArray to the XFA side.Tom Sepez
Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 .
2016-02-08CPDF_TextStream::m_pObjArray is always NULLTom Sepez
Also, use full path to include "text_int.h", as there are two of them; I suspect that fpdf_text_search was including the wrong one as the compiler didn't complain about a signature mismatch I had overlooked. In fact, rename the fxge file to avoid collision completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1679743003 .
2016-01-05Merge 3d8f56d back to xfaTom Sepez
Required to build XFA branch in non-xfa mode. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1560313002 .
2015-12-22Merge to XFA: Start using allowed C++11 features.Lei Zhang
TBR=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 . Review URL: https://codereview.chromium.org/1545823002 . (cherry picked from commit ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6) (cherry picked from commit 87f7d29531dabfd66e547a6be31a08272ff631d5) Review URL: https://codereview.chromium.org/1542213002 .
2015-12-22Merge to XFA: Add ContainsKey() and ContainsValue() and use them where ↵Lei Zhang
appropriate. TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1540263003 . (cherry picked from commit 1fc92867ca53f0fba4272fbee3814d844f487495) Review URL: https://codereview.chromium.org/1542193002 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo == NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
2015-12-14Merge to XFA: Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 . (cherry picked from commit 1956a174020686f91cd3b34294e91f4560fe45aa) Review URL: https://codereview.chromium.org/1526823002 .
2015-12-09Fix heap-use-after-free in FT_Stream_ReleaseFrameJun Fang
BUG=452793,561478 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512873002 .
2015-12-08Merge to XFA: Fix rendering with built-in CID fontsJun Fang
The root cause is that FXFONT_SUBST_EXACT is wrongly set even no any subset font was found. It causes m_bCIDIsGID to be wrongly set as TRUE in CPDF_CIDFont::_Load(). BUG=534945 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1502083002 . Review URL: https://codereview.chromium.org/1504263002 .
2015-11-25Manual fixups to PDF_ENABLE_XFA in core/Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477663003 .
2015-11-25Inflict PPDF_ENABLE_XFA ifdefs on XFA core/Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1471323004 .
2015-11-12Merge to XFA: Remove relative includes.Lei Zhang
That refer to parent directories. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 . (cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228) Review URL: https://codereview.chromium.org/1439223003 .
2015-11-11Merge to XFA: Fix / simplify CFX_FolderFontInfo::GetFontData() behavior.Lei Zhang
The GetFontData() behavior in FPDF_SYSFONTINFO seems reasonable. Also do some code cleanup. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425023003 . (cherry picked from commit e0c16d7461ca8317433d93835e4c36a84157cbef) Review URL: https://codereview.chromium.org/1438943002 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-09Merge to XFA: Cleanup some fxge font code.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1426403008 . (cherry picked from commit 94a4956f7aadc10fe6dd8451e965bd7447985b76) Review URL: https://codereview.chromium.org/1410683013 .
2015-11-04Merge to XFA: Make built-in font table slightly saner.Tom Sepez
Original Review URL: https://codereview.chromium.org/1409243012 . (cherry picked from commit 0142f017d03df17fac98b586487cae23b6be05a6) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1429183002 .
2015-11-03Merge to XFA: Remove CFontFileFaceInfo.Tom Sepez
Original Review URL: https://codereview.chromium.org/1412243015 . (cherry picked from commit cbd6bba62777131e39e3c4fd2d0028b472fb94c9) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1416953005 .
2015-11-02Merge to XFA: Check fread() return values in CFX_FolderFontInfo::GetFontData().Lei Zhang
Check fseek() return values too. BUG=549998 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1419793003 . (cherry picked from commit 99818557c8ed64d00fcc23a1e87e1ebf41ed5e85) Review URL: https://codereview.chromium.org/1426263002 .
2015-10-30XFA: Take CTTFontDesc::ReleaseFace() changes from master.Tom Sepez
Return true if object destroyed. Also get rid of FXFT_Done_Face() call not present on master. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1426103002 .
2015-10-21Merge to XFA: Make CFX_FontMgr member variables private. (try 2)Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1412733011 . (cherry picked from commit 5a5b6fb3759daf1201ffc9702f626f4b243922d0) Review URL: https://codereview.chromium.org/1414463006 .
2015-10-16Merge to XFA: Don't bother passing -1 as the length to the CFX_ByteString ctor.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406363002 . (cherry picked from commit 316e482630d5f5d9084edd9725f98a0d89a5bbdf) Review URL: https://codereview.chromium.org/1406303006 .
2015-10-16Merge to XFA: Declare PDF_GetStandardFontName() in the header.Lei Zhang
R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410043003 . (cherry picked from commit 3d7d1d2f29e5fb099367a40822684d31f684fd62) Review URL: https://codereview.chromium.org/1415453002 .
2015-10-16fxcrt convergence - XFA side.Tom Sepez
Take extern tables portion only of fx_bidi change. Take itoa fixes and corresponding unit test. Merge typo in skia font mgr. Kill some null checks after new. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1409223002 .
2015-10-05Merge to XFA: Added a fallback Win32 font information class for win32k lockdown.Tom Sepez
(cherry picked from commit d7ba833df5c9dc70cb94dba2d0aae1339b345ae4) Original Review URL: https://codereview.chromium.org/1306883002 . TBR=forshaw@chromium.org BUG=523278 Review URL: https://codereview.chromium.org/1383353002 .
2015-09-23Merge to XFA: Allow external font-path configuration from pdfium_test.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1268323004 . (cherry picked from commit 9311163b564785a3a3ccdcb09bd3b7d0b2976d1a) Review URL: https://codereview.chromium.org/1368513002 .
2015-09-22Merge to XFA: Add missing 'return' keyword.Lei Zhang
Discovered with experimental Clang plugin that flags temporary objects that are immediately destroyed. patch from issue 1359063003 at patchset 1 (http://crrev.com/1359063003#ps1) A=mdempsky@chromium.org TBR=mdempsky@chromium.org Review URL: https://codereview.chromium.org/1359103002 . (cherry picked from commit f316bfe37e2fc977376e18f7534aae9824da240a) Review URL: https://codereview.chromium.org/1362863002 .
2015-08-20Merge to XFA: Fix some -Wmaybe-uninitialized errors.Lei Zhang
- Break up CPDF_DIBSource::DownSampleScanline() into smaller functions. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287843004 . (cherry picked from commit 9ae9ae2a68439cbc84a719c0dacf6984703e77cb) Review URL: https://codereview.chromium.org/1304873002 .
2015-08-19Merge to XFA: Extern in .cpp file is a code smell, part 2.Tom Sepez
(cherry picked from commit c3f4894a6862c74b9ab32b4ec38c531de6ecd83c) Original Review URL: https://codereview.chromium.org/1298393003 . Fixed IWYU in core/src/fpdftext/text_int.h exposed by new inclusion. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1294933008 .
2015-08-19Merge to XFA: Extern in .cpp files is a code smell, part 1.Tom Sepez
(cherry picked from commit 71c15a5e6652952a94ba3a3ef7ac0392e3a06962) Original Review URL: https://codereview.chromium.org/1299963002 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1301073003 .
2015-08-19Merge to XFA: CFX_MapByteStringToPtr considered harmful (combo patch).Tom Sepez
New manual edits: two unused members deleted, one adapted. fde_csscache.cpp fde_csscache.h fpdfxfa_doc.h fx_ge_fontmap.cpp (cherry picked from commit 1d9dbd53b205b2b4d9e75a7eeb95e80837917ea3) (cherry picked from commit cb4d0ea68308e3c51a6ba9551b393bb2f639afc4) (cherry picked from commit 9cf44c2ed09a8b2ff243eb6dbb72a8cceae1b5ff) (cherry picked from commit 2a2a6aa7f51352fc481e78f6ad9d41f2738bcc48) (cherry picked from commit ce4ffb8183af3fa2bb5133f0f7370a88e064c516) Original Review URL: https://codereview.chromium.org/1297723002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1301793002 .
2015-08-14Merge to XFA: Don't bother checking pointers before delete[] and FX_Free().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 . (cherry picked from commit cb62e7657b3a9a04142028a4e6614029a08e894b) Review URL: https://codereview.chromium.org/1287053005 .
2015-08-06Merge to XFA: Add CFX_FontFaceInfo constructor.Tom Sepez
(cherry picked from commit 905cc10ecd06bcacfefb747cc3370c72772f0e15) Original Review URL: https://codereview.chromium.org/1277883004 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1279873002 .
2015-08-05Kill off last uses of FX_NEW in XFA.Tom Sepez
It would seem that this never merged completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277583002 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-31Merge to XFA: Kill IFX_FontMapperTom Sepez
(cherry picked from commit 01fa1efb228acdcf5250804c670107133668e4b2) Orignal Review URL: https://codereview.chromium.org/1259123005 . conflicts: core/include/fxge/fx_font.h core/src/fxge/ge/fx_ge_fontmap.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1262723006 .
2015-07-30Merge to XFA: Fix return check in CFX_FolderFontInfo::ScanFile() fread.Tom Sepez
(cherry picked from commit 6fc1bf199833d6cb409e8134fe5d6894e8323673) Original Review URL: https://codereview.chromium.org/1262453006 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1263813004 .
2015-07-23Merge to XFA: FX_BOOL combo patch.Tom Sepez
Original Review URL: https://codereview.chromium.org/1257503002 Original Review URL: https://codereview.chromium.org/1253603002 Manual merge for: core/include/fxge/fx_font.h core/src/fxcodec/codec/codec_int.h fpdfsdk/src/javascript/PublicMethods.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1248153004 .
2015-07-23Merge to XFA - else after returns.Tom Sepez
(cherry picked from commit 3c012fef2bb72c8ec1faa73e11ee35539b2559d6) Original Review URL: https://codereview.chromium.org/1243953004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1239313005 .
2015-06-19Merge to XFA: Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004. (cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271) Review URL: https://codereview.chromium.org/1196783003.
2015-06-13Remove trailing whitespaces in core, XFA edition.Lei Zhang
Review URL: https://codereview.chromium.org/1180333002.
2015-06-11Merge to XFA: Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
Only manual merge was core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp follwed by scripts. Original Review URL: https://codereview.chromium.org/1179693003. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1179953002.
2015-06-10Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.Tom Sepez
Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002.
2015-06-10Merge to XFA: Remove typdefs for pointer types in fx_system.h.Tom Sepez
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.