From 656eb84f83fc1701737d9c65658371a99428d727 Mon Sep 17 00:00:00 2001 From: Artem Strygin Date: Thu, 31 May 2018 14:08:11 +0000 Subject: Move codepage/charset methods into related places. Change-Id: I71417cc5b1bd00f77d42740198cc17487ebd686e Reviewed-on: https://pdfium-review.googlesource.com/33330 Reviewed-by: dsinclair Commit-Queue: Art Snake --- core/fxge/cfx_font.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'core/fxge/cfx_font.h') 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 m_pOwnedStream; -- cgit v1.2.3