Add MS fonts to the Linux Japanese font substitution list
In fx_linux_impl.cpp, prepend MS Japanese fonts to `kJpFontTable`, so
they are first in the preferences list. Oftentimes, the MS fonts are
better than their open source counterparts, so prefer them if they
happen to be available.
Bug: 341395454
Change-Id: I960c79e80a05727c51d1ea27a60d4fe5a3d98c34
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/121850
Reviewed-by: Tom Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/linux/fx_linux_impl.cpp b/core/fxge/linux/fx_linux_impl.cpp
index 47b1bd7..b3e1518 100644
--- a/core/fxge/linux/fx_linux_impl.cpp
+++ b/core/fxge/linux/fx_linux_impl.cpp
@@ -33,13 +33,13 @@
kJpFontMincho,
};
-constexpr size_t kJpFontFamilyColumnCount = 4;
+constexpr size_t kJpFontFamilyColumnCount = 5;
using JpFontFamilyRow = std::array<const char*, kJpFontFamilyColumnCount>;
constexpr auto kJpFontTable = fxcrt::ToArray<const JpFontFamilyRow>({
- {{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic"}},
- {{"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic"}},
- {{"TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho"}},
- {{"TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho"}},
+ {{"MS PGothic", "TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic"}},
+ {{"MS Gothic", "TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic"}},
+ {{"MS PMincho", "TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho"}},
+ {{"MS Mincho", "TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho"}},
});
const char* const kGbFontList[] = {