Merge "Update ImageGenerator to match the latest font names." into sc-dev
This commit is contained in:
commit
2e72f0af9d
1 changed files with 27 additions and 27 deletions
|
@ -113,33 +113,33 @@ public class ImageGenerator {
|
||||||
private static final Map<String, String> LANGUAGE_TO_FONT_MAP =
|
private static final Map<String, String> LANGUAGE_TO_FONT_MAP =
|
||||||
new TreeMap<String, String>() {
|
new TreeMap<String, String>() {
|
||||||
{
|
{
|
||||||
put("am", "NotoSansEthiopic-VF");
|
put("am", "NotoSansEthiopic-Regular");
|
||||||
put("ar", "NotoNaskhArabicUI-Regular");
|
put("ar", "NotoNaskhArabicUI");
|
||||||
put("as", "NotoSansBengaliUI-VF");
|
put("as", "NotoSansBengaliUI-Regular");
|
||||||
put("bn", "NotoSansBengaliUI-VF");
|
put("bn", "NotoSansBengaliUI-Regular");
|
||||||
put("fa", "NotoNaskhArabicUI-Regular");
|
put("fa", "NotoNaskhArabicUI");
|
||||||
put("gu", "NotoSansGujaratiUI-Regular");
|
put("gu", "NotoSansGujaratiUI");
|
||||||
put("hi", "NotoSansDevanagariUI-VF");
|
put("hi", "NotoSansDevanagariUI-Regular");
|
||||||
put("hy", "NotoSansArmenian-VF");
|
put("hy", "NotoSansArmenian-Regular");
|
||||||
put("iw", "NotoSansHebrew-Regular");
|
put("iw", "NotoSansHebrew");
|
||||||
put("ja", "NotoSansCJK-Regular");
|
put("ja", "NotoSansCJKjp-Regular");
|
||||||
put("ka", "NotoSansGeorgian-VF");
|
put("ka", "NotoSansGeorgian-Regular");
|
||||||
put("ko", "NotoSansCJK-Regular");
|
put("ko", "NotoSansCJKjp-Regular");
|
||||||
put("km", "NotoSansKhmerUI-Regular");
|
put("km", "NotoSansKhmerUI");
|
||||||
put("kn", "NotoSansKannadaUI-VF");
|
put("kn", "NotoSansKannadaUI-Regular");
|
||||||
put("lo", "NotoSansLaoUI-Regular");
|
put("lo", "NotoSansLaoUI");
|
||||||
put("ml", "NotoSansMalayalamUI-VF");
|
put("ml", "NotoSansMalayalamUI-Regular");
|
||||||
put("mr", "NotoSansDevanagariUI-VF");
|
put("mr", "NotoSansDevanagariUI-Regular");
|
||||||
put("my", "NotoSansMyanmarUI-Regular");
|
put("my", "NotoSansMyanmarUI-Regular");
|
||||||
put("ne", "NotoSansDevanagariUI-VF");
|
put("ne", "NotoSansDevanagariUI-Regular");
|
||||||
put("or", "NotoSansOriya-Regular");
|
put("or", "NotoSansOriya");
|
||||||
put("pa", "NotoSansGurmukhiUI-VF");
|
put("pa", "NotoSansGurmukhiUI-Regular");
|
||||||
put("si", "NotoSansSinhalaUI-VF");
|
put("si", "NotoSansSinhalaUI-Regular");
|
||||||
put("ta", "NotoSansTamilUI-VF");
|
put("ta", "NotoSansTamilUI-Regular");
|
||||||
put("te", "NotoSansTeluguUI-VF");
|
put("te", "NotoSansTeluguUI-Regular");
|
||||||
put("th", "NotoSansThaiUI-Regular");
|
put("th", "NotoSansThaiUI");
|
||||||
put("ur", "NotoNaskhArabicUI-Regular");
|
put("ur", "NotoNaskhArabicUI");
|
||||||
put("zh", "NotoSansCJK-Regular");
|
put("zh", "NotoSansCJKjp-Regular");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ public class ImageGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
String fontName = LANGUAGE_TO_FONT_MAP.getOrDefault(language, DEFAULT_FONT_NAME);
|
String fontName = LANGUAGE_TO_FONT_MAP.getOrDefault(language, DEFAULT_FONT_NAME);
|
||||||
String[] suffixes = {".otf", ".ttf", ".ttc"};
|
String[] suffixes = {".otf", ".ttf", ".ttc", ".otc"};
|
||||||
for (String suffix : suffixes) {
|
for (String suffix : suffixes) {
|
||||||
File fontFile = new File(mFontDirPath, fontName + suffix);
|
File fontFile = new File(mFontDirPath, fontName + suffix);
|
||||||
if (fontFile.isFile()) {
|
if (fontFile.isFile()) {
|
||||||
|
|
Loading…
Reference in a new issue