Add some missing charset constants to fpdf_sysfontinfo.h
The constants being added are values that can be returned by
CFX_Font::GetCharSetFromUnicode() and subsequently passed to
the public FPDF_SYSFONTINFO::MapFont() interface.
PiperOrigin-RevId: 424599838
Change-Id: I67f5ddf38b9d646efebb9408e459f9932327d476
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/89930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 4ab824b..0cf14de 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -36,12 +36,23 @@
static_assert(FXFONT_CHINESEBIG5_CHARSET ==
static_cast<int>(FX_Charset::kChineseTraditional),
"Charset must match");
+static_assert(FXFONT_GREEK_CHARSET ==
+ static_cast<int>(FX_Charset::kMSWin_Greek),
+ "Charset must match");
+static_assert(FXFONT_VIETNAMESE_CHARSET ==
+ static_cast<int>(FX_Charset::kMSWin_Vietnamese),
+ "Charset must match");
+static_assert(FXFONT_HEBREW_CHARSET ==
+ static_cast<int>(FX_Charset::kMSWin_Hebrew),
+ "Charset must match");
static_assert(FXFONT_ARABIC_CHARSET ==
static_cast<int>(FX_Charset::kMSWin_Arabic),
"Charset must match");
static_assert(FXFONT_CYRILLIC_CHARSET ==
static_cast<int>(FX_Charset::kMSWin_Cyrillic),
"Charset must match");
+static_assert(FXFONT_THAI_CHARSET == static_cast<int>(FX_Charset::kThai),
+ "Charset must match");
static_assert(FXFONT_EASTERNEUROPEAN_CHARSET ==
static_cast<int>(FX_Charset::kMSWin_EasternEuropean),
"Charset must match");
diff --git a/public/fpdf_sysfontinfo.h b/public/fpdf_sysfontinfo.h
index 936de96..0a02a35 100644
--- a/public/fpdf_sysfontinfo.h
+++ b/public/fpdf_sysfontinfo.h
@@ -19,8 +19,12 @@
#define FXFONT_HANGEUL_CHARSET 129
#define FXFONT_GB2312_CHARSET 134
#define FXFONT_CHINESEBIG5_CHARSET 136
+#define FXFONT_GREEK_CHARSET 161
+#define FXFONT_VIETNAMESE_CHARSET 163
+#define FXFONT_HEBREW_CHARSET 177
#define FXFONT_ARABIC_CHARSET 178
#define FXFONT_CYRILLIC_CHARSET 204
+#define FXFONT_THAI_CHARSET 222
#define FXFONT_EASTERNEUROPEAN_CHARSET 238
/* Font pitch and family flags */