mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-14 22:14:23 +00:00
linux: Fix wrong names reported by all_font_names
(#14865)
The names suggested by `buffer_font_family` are reported by `all_font_names`. Therefore, `all_font_names` should report family names rather than postscript names. close #14854 Release Notes: - N/A
This commit is contained in:
parent
86456ce379
commit
f3ad754396
1 changed files with 7 additions and 3 deletions
|
@ -64,13 +64,17 @@ impl PlatformTextSystem for CosmicTextSystem {
|
|||
}
|
||||
|
||||
fn all_font_names(&self) -> Vec<String> {
|
||||
self.0
|
||||
let mut result = self
|
||||
.0
|
||||
.read()
|
||||
.font_system
|
||||
.db()
|
||||
.faces()
|
||||
.map(|face| face.post_script_name.clone())
|
||||
.collect()
|
||||
.filter_map(|face| face.families.first().map(|family| family.0.clone()))
|
||||
.collect_vec();
|
||||
result.sort();
|
||||
result.dedup();
|
||||
result
|
||||
}
|
||||
|
||||
fn all_font_families(&self) -> Vec<String> {
|
||||
|
|
Loading…
Reference in a new issue