Update Windows fallback lists
This commit is contained in:
parent
4b98970436
commit
91f79dff95
1 changed files with 15 additions and 10 deletions
|
|
@ -21,17 +21,15 @@ fn han_unification(locale: &str) -> &'static [&'static str] {
|
|||
//TODO!
|
||||
match locale {
|
||||
// Japan
|
||||
"ja" => &[],
|
||||
"ja" => &["Yu Gothic"],
|
||||
// Korea
|
||||
"ko" => &[],
|
||||
// China
|
||||
"zh-CN" => &[],
|
||||
// Hong Kong
|
||||
"zh-HK" => &[],
|
||||
"ko" => &["Malgun Gothic"],
|
||||
// Hong Kong"
|
||||
"zh-HK" => &["MingLiU_HKSCS"],
|
||||
// Taiwan
|
||||
"zh-TW" => &[],
|
||||
// Simplified Chinese is the default
|
||||
_ => &[],
|
||||
"zh-TW" => &["Microsoft JhengHei UI"],
|
||||
// Simplified Chinese is the default (also catches "zh-CN" for China)
|
||||
_ => &["Microsoft YaHei UI"]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,16 +37,21 @@ fn han_unification(locale: &str) -> &'static [&'static str] {
|
|||
pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] {
|
||||
//TODO: better match https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc#L99
|
||||
match script {
|
||||
Script::Adlam => &["Ebrima"],
|
||||
Script::Bengali => &["Nirmala UI"],
|
||||
Script::Canadian_Aboriginal => &["Gadugi"],
|
||||
Script::Chakma => &["Nirmala UI"],
|
||||
Script::Cherokee => &["Gadugi"],
|
||||
Script::Devanagari => &["Nirmala UI"],
|
||||
Script::Ethiopic => &["Ebrima"],
|
||||
Script::Gujarati => &["Nirmala UI"],
|
||||
Script::Gurmukhi => &["Nirmala UI"],
|
||||
Script::Han => han_unification(locale),
|
||||
Script::Hangul => &["Malgun Gothic"],
|
||||
Script::Hangul => han_unification("ko"),
|
||||
Script::Hiragana => han_unification("ja"),
|
||||
Script::Javanese => &["Javanese Text"],
|
||||
Script::Kannada => &["Nirmala UI"],
|
||||
Script::Katakana => han_unification("ja"),
|
||||
Script::Khmer => &["Leelawadee UI"],
|
||||
Script::Lao => &["Leelawadee UI"],
|
||||
Script::Malayalam => &["Nirmala UI"],
|
||||
|
|
@ -61,6 +64,8 @@ pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str]
|
|||
Script::Thaana => &["MV Boli"],
|
||||
Script::Thai => &["Leelawadee UI"],
|
||||
Script::Tibetan => &["Microsoft Himalaya"],
|
||||
Script::Tifinagh => &["Ebrima"],
|
||||
Script::Vai => &["Ebrima"],
|
||||
Script::Yi => &["Microsoft Yi Baiti"],
|
||||
_ => &[],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue