summaryrefslogtreecommitdiff
path: root/core/fpdfapi/cmaps
AgeCommit message (Collapse)Author
2018-08-29Remove FPDFAPI_ prefix from internal cid/encoder functionsTom Sepez
These look too much like public/ FPDF functions otherwise and yet they are not exposed anywhere beyond core/fpdfapi. Disambiguate one method vs. top-level function usage as a result. Bug: pdfium:1141 Change-Id: I9cfdfced90386bb9ef6b2b86f568f2e6f8ee6a5a Reviewed-on: https://pdfium-review.googlesource.com/41530 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-25Remove some ASSERT (and cast) in favor of checked cases.Tom Sepez
Because it is a stronger pattern at runtime. These were found by essentially: grep -ni '\bassert\b.*type' Change-Id: I913d77139053e8980528597a6633e1859e5204c4 Reviewed-on: https://pdfium-review.googlesource.com/38890 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-25Use struct {Single,Range}Cmap in FPDFAPI_CIDFromCharCode().Tom Sepez
Clearer that just using indexing off of raw pointers, and makes the code more closely resemble other functions. Change-Id: I7cc8363b505e66120bc1c686bb23b2bdf8fc401f Reviewed-on: https://pdfium-review.googlesource.com/38894 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-02Comment some raw pointers that cant become UnownedPtr<>.Tom Sepez
These appear in compile-time const data. Adding the comment makes it easier to see what work remains when using grep. Change-Id: Ibb5fe920dc9fc99dd4c866f9ddf800a58f6a67a8 Reviewed-on: https://pdfium-review.googlesource.com/36690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-26Use pdfium::span<> in cpdf_fontglobals.hTom Sepez
Required moving some sizes to .h file for default construction of spans from c-style arrays. Change-Id: I45c42103f3575bc83e57a085ad4e8f16698468d3 Reviewed-on: https://pdfium-review.googlesource.com/36190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-12-05Replace bsearch() in FPDFAPI_CIDFromCharCode().Lei Zhang
Use std::lower_bound() instead. Change-Id: I0bed2a90f3aa427a283cd86a050a027ec7a64358 Reviewed-on: https://pdfium-review.googlesource.com/20430 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-12-05Remove redundant field in struct FXCMAP_CMap.Lei Zhang
Change-Id: Ibac6398b5849820562830bb8ed95c3428496f7ef Reviewed-on: https://pdfium-review.googlesource.com/20410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-30Fix GBK2K-H CMap usage.Lei Zhang
The data used is clearly a CID Range, but the code was interpreting it as single CID values. Change-Id: Ibb68f5ca2150d74b007a64ef5daa412fd542cecd Reviewed-on: https://pdfium-review.googlesource.com/17650 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-06Pack struct FXCMAP_CMap more densely to save 1 KB.Lei Zhang
Change-Id: Ida9738f4ad7ef266c2edb794f12dcf49b64fc590 Reviewed-on: https://pdfium-review.googlesource.com/17750 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-02Simplify some CMap code.Lei Zhang
Change-Id: Ie7eb2605a789d2c841cb1dc123509f473c4c5a5e Reviewed-on: https://pdfium-review.googlesource.com/17410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-10-04Make CPDF_FontGlobals members privateDan Sinclair
This CL makes the embedded maps and the cmap manager private to CPDF_FontGlobals and adds accessor methods as needed. Change-Id: I50350fcfad5428defe5e68d9d3b29e8961e66e9f Reviewed-on: https://pdfium-review.googlesource.com/15412 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-09-18Convert string class namesRyan Harrison
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>
2017-08-31Remove fx_basic.hDan Sinclair
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-26Use proper file names in core/fpdfapi/fontNicolas Pena
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>
2017-05-25Mass conversion of remaining class members (non-xfa)Tom Sepez
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-04-03Drop FXSYS_ from util methodsDan Sinclair
This Cl drops the FXSYS_ from utility methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I0859b60c5ba7af68c929a519dd76f48c27a6c896 Reviewed-on: https://pdfium-review.googlesource.com/3614 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2016-10-04Move core/fpdfapi/fpdf_page to core/fpdfapi/pagedsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386423004
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