Skip to main content

parse_font_list

Function parse_font_list 

Source
pub fn parse_font_list(s: &str) -> Vec<FontFamilyInfo>
Expand description

Decode the text a non-Rust font enumerator hands back (the Qt, XAML and ArkUI shims, the Android bridge, the web shim all produce this one format): families separated by U+001E; inside a family, U+001F-separated fields: the family name, then one (name, CSS weight, italic 0/1) triple per face. Tolerant: a malformed face or family is skipped, an empty face name is synthesized from its weight and slant, and a family with no faces is kept with none (the caller decides what a face-less family means).