summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_font.h
AgeCommit message (Collapse)Author
2018-08-10Remove |typedef struct| in favor of just |struct|.Tom Sepez
Because I saw one in some other code and decided to hunt them all. These are all defined in C++ context, so no chance of C compatiblity. Note that such a declaration without a struct tag will bypass the [chromium-style] out-of-line constructor/destructor warnings, so add constructors/destructors where required. Change-Id: Ib821d8bc2f68ccf7028b0f73432e8e7c93a953ba Reviewed-on: https://pdfium-review.googlesource.com/39851 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-06-13Guard some non-windows only code in cfx_font with ifdefs.Tom Sepez
The callers are all in blocks controlled by the same ifdef. Change-Id: I2bf1dfd8725eefcfab5b05460fc31b0e7e08c75e Reviewed-on: https://pdfium-review.googlesource.com/35090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-31Move codepage/charset methods into related places.Artem Strygin
Change-Id: I71417cc5b1bd00f77d42740198cc17487ebd686e Reviewed-on: https://pdfium-review.googlesource.com/33330 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-05-31Fix font regression in AdjustMMParamsNicolas Pena
Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to unsigned, but this means that dest_width - min_width becomes unsigned, which is wrong because the subtraction could be negative. This CL fixes this bug. Bug: chromium:845697 Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0 Reviewed-on: https://pdfium-review.googlesource.com/33150 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-29Pass a CFX_Matrix by reference in font code.chromium/3445Lei Zhang
The callers always pass in a valid CFX_Matrix, so eliminate the possibility of a nullptr. Change-Id: Id7d8b731ed60d5f66517b50c56efeca343e897c4 Reviewed-on: https://pdfium-review.googlesource.com/33152 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-12Make CFX_Font take FX_RECT out params by pointer.Lei Zhang
Change-Id: I6643aaf66bf3e9d53d5afab5c99a5cb7deab3661 Reviewed-on: https://pdfium-review.googlesource.com/30054 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-16Fix methods that have definition with different parameter names.Lei Zhang
Found by ClangTidy. BUG=pdfium:1039 Change-Id: I2bb9256a63d5459e959c1a3228418073245d7a86 Reviewed-on: https://pdfium-review.googlesource.com/28731 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-30Use unsigned for char widthchromium/3335Nicolas Pena
Bug: 806612 Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1 Reviewed-on: https://pdfium-review.googlesource.com/24410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-01-12Move some RetainPtr getters/setters out of headers.Lei Zhang
RetainPtr operations are not trivial. Change-Id: Ic106ada69d1c023a8132a2a59db17d550fd81fa0 Reviewed-on: https://pdfium-review.googlesource.com/22911 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-11-16Refactor CFGAS_FontMgr's Windows implementationNicolas Pena
This CL unifies a bit the public methods of CFGAS_FontMgr. It does so by replacing the multiple maps on the Windows implementation to a single map from hash to font. Also, cloning CFX_Fonts is avoided with the use of SetLogicalFontStyle. These Windows changes are just mimicking other OS's. As a side-effect, some members of CFX_Fonts are now owned so the raw pointers are replaced with unique_ptrs. Change-Id: I576d438572ccbe6c48f8f5cc434d66fc6adba372 Reviewed-on: https://pdfium-review.googlesource.com/18131 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2017-10-17Remove fxge/ friend classesDan Sinclair
This CL removes friends from classes in fxge/. Change-Id: I8180004de3ebf818ed4c8d5256a01c33cd2d880e Reviewed-on: https://pdfium-review.googlesource.com/16170 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-27Move CFX_Font definition to cfx_font.hDan Sinclair
This CL moves the CFX_Font definition out of fx_font.h and into cfx_font.h to match the cfx_font.cpp implementation. Change-Id: Icc2fc7463fa4b9d0bec925e80b60a638136a83a1 Reviewed-on: https://pdfium-review.googlesource.com/14951 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>