zed
zed copied to clipboard
Implement `all_font_families` for the LinuxTextSystem
Implemented the function to get all font family names for LinuxTextSystem which was previously kept as unimplemented.
Release Notes:
- N/A
Change Explanation:
- We get the
&Databasestruct from theFontSystemby using the.dbmethod. - From the
Databasestruct we get theFaceInfowhich the provides a method to get the family names(families) - The
familiesfunction returns a tuple of Vec. The tuple consists of theStringcontaining the name and theLanguagestruct.
It is noted that for the families function, the first family is always English US unless it is unavailable
Since the empty function provided here explicitly declares a Vec<String> as the return type so I am prioritizing the English US font family unless advised otherwise by the reviewer.