From f9985f8cae1c8c6f5e4e4c43f68a75a1beb0d5ef Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 13 Oct 2022 13:58:15 -0600 Subject: [PATCH] Add some Windows script definitions --- examples/text/src/font/fallback/windows.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/text/src/font/fallback/windows.rs b/examples/text/src/font/fallback/windows.rs index 5d38ec69..346978c6 100644 --- a/examples/text/src/font/fallback/windows.rs +++ b/examples/text/src/font/fallback/windows.rs @@ -5,15 +5,23 @@ pub fn common_fallback() -> &'static [&'static str] { //TODO: abstract style (sans/serif/monospaced) &[ "Segoe UI", - "FreeSans", - "Segoe UI Symbol", "Segoe UI Emoji", + "Segoe UI Symbol", + "Segoe UI Historic", //TODO: Add CJK script here for doublewides? ] } // Fallbacks to use per script pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] { - //TODO: per-script fallbacks - &[] + match script { + Script::Bengali => &["Nirmala UI"], + Script::Devanagari => &["Nirmala UI"], + Script::Gujarati => &["Nirmala UI"], + Script::Gurmukhi => &["Nirmala UI"], + Script::Tamil => &["Nirmala UI"], + Script::Telugu => &["Nirmala UI"], + Script::Thaana => &["MV Boli"], + _ => &[], + } }