mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
ohos: fonts: Fix HalfwidthandFullwidthForms font fallback (#34410)
This codeblock contains chinese, japanese and korean characters, so we add the simplified chinese and the CJK fallback fonts. Additionally, we add the new CJK fallback font for the koren and japanese unicode blocks, since the KR and JP fallback fonts don't seem to be present on the latest OH versions anymore. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
f9eb32a515
commit
895b8d30ea
1 changed files with 8 additions and 0 deletions
|
@ -539,13 +539,21 @@ pub fn fallback_font_families(options: FallbackFontSelectionOptions) -> Vec<&'st
|
||||||
UnicodeBlock::HangulJamoExtendedA |
|
UnicodeBlock::HangulJamoExtendedA |
|
||||||
UnicodeBlock::HangulJamoExtendedB |
|
UnicodeBlock::HangulJamoExtendedB |
|
||||||
UnicodeBlock::HangulSyllables => {
|
UnicodeBlock::HangulSyllables => {
|
||||||
|
families.push("Noto Sans CJK");
|
||||||
|
families.push("Noto Serif CJK");
|
||||||
families.push("Noto Sans KR");
|
families.push("Noto Sans KR");
|
||||||
},
|
},
|
||||||
UnicodeBlock::Hiragana |
|
UnicodeBlock::Hiragana |
|
||||||
UnicodeBlock::Katakana |
|
UnicodeBlock::Katakana |
|
||||||
UnicodeBlock::KatakanaPhoneticExtensions => {
|
UnicodeBlock::KatakanaPhoneticExtensions => {
|
||||||
|
families.push("Noto Sans CJK");
|
||||||
|
families.push("Noto Serif CJK");
|
||||||
families.push("Noto Sans JP");
|
families.push("Noto Sans JP");
|
||||||
},
|
},
|
||||||
|
UnicodeBlock::HalfwidthandFullwidthForms => {
|
||||||
|
families.push("HarmonyOS Sans SC");
|
||||||
|
families.push("Noto Sans CJK");
|
||||||
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue