zed icon indicating copy to clipboard operation
zed copied to clipboard

Implement `all_font_families` for the LinuxTextSystem

Open MashyBasker opened this issue 2 years ago • 0 comments

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 &Database struct from the FontSystem by using the .db method.
  • From the Database struct we get the FaceInfo which the provides a method to get the family names(families)
  • The families function returns a tuple of Vec. The tuple consists of the String containing the name and the Language struct.

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.

MashyBasker avatar Feb 24 '24 09:02 MashyBasker