diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2018-05-31 14:08:11 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-31 14:08:11 +0000 |
commit | 656eb84f83fc1701737d9c65658371a99428d727 (patch) | |
tree | 6fb28e4283c1ef8696b42d8b7d200a13c32742fc /core/fxge/cfx_font.h | |
parent | 8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c (diff) | |
download | pdfium-656eb84f83fc1701737d9c65658371a99428d727.tar.xz |
Move codepage/charset methods into related places.
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>
Diffstat (limited to 'core/fxge/cfx_font.h')
-rw-r--r-- | core/fxge/cfx_font.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/fxge/cfx_font.h b/core/fxge/cfx_font.h index fbf35eaca1..a5a0057c16 100644 --- a/core/fxge/cfx_font.h +++ b/core/fxge/cfx_font.h @@ -30,6 +30,11 @@ class CFX_Font { CFX_Font(); ~CFX_Font(); + static const char kDefaultAnsiFontName[]; + static const char kUniversalDefaultFontName[]; + static ByteString GetDefaultFontNameByCharset(uint8_t nCharset); + static uint8_t GetCharSetFromUnicode(uint16_t word); + void LoadSubst(const ByteString& face_name, bool bTrueType, uint32_t flags, @@ -96,6 +101,19 @@ class CFX_Font { static const uint8_t s_WeightPow_11[kWeightPowArraySize]; static const uint8_t s_WeightPow_SHIFTJIS[kWeightPowArraySize]; + // This struct shoub same as FPDF_CharsetFontMap + typedef struct { + int charset; // Character Set Enum value, see FX_CHARSET_XXX. + const char* fontname; // Name of default font to use with that charset. + } CharsetFontMap; + + /** + * Pointer to the default character set to TT Font name map. The + * map is an array of CharsetFontMap structs, with its end indicated + * by a { -1, NULL } entry. + **/ + static const CharsetFontMap defaultTTFMap[]; + #ifdef PDF_ENABLE_XFA protected: std::unique_ptr<FXFT_StreamRec> m_pOwnedStream; |