Implement `all_font_families` for the LinuxTextSystem (#8331)
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`](https://docs.rs/fontdb/0.16.1/fontdb/struct.Database.html) struct from the [`FontSystem`](https://docs.rs/cosmic-text/latest/cosmic_text/struct.FontSystem.html) by using the `.db` method. - From the `Database` struct we get the [`FaceInfo`](https://docs.rs/fontdb/0.16.1/fontdb/struct.FaceInfo.html) which the provides a method to get the family names([`families`](https://docs.rs/fontdb/0.16.1/fontdb/struct.FaceInfo.html#structfield.families)) - The `families` function returns a tuple of Vec. The tuple consists of the `String` containing the name and the [`Language`](https://docs.rs/fontdb/0.16.1/fontdb/enum.Language.html) 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](https://github.com/zed-industries/zed/blob/main/crates/gpui/src/platform/linux/text_system.rs#L75) explicitly declares a `Vec<String>` as the return type so I am prioritizing the `English US` font family unless advised otherwise by the reviewer. --------- Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
M
Maharshi Basu committed
a5eab29662e82458115841b10d1e7c7322644ba7
Parent: 6a6dbe3
Committed by GitHub <noreply@github.com>
on 3/3/2024, 7:28:53 PM