Only list font names once

This commit is contained in:
Jeremy Soller 2024-06-10 08:49:52 -06:00
parent 0693acfdd4
commit c2f49c8422
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -1255,9 +1255,11 @@ impl Application for App {
.families .families
.first() .first()
.map_or_else(|| face.post_script_name.to_string(), |x| x.0.to_string()); .map_or_else(|| face.post_script_name.to_string(), |x| x.0.to_string());
if !font_names.contains(&font_name) {
font_names.push(font_name); font_names.push(font_name);
} }
} }
}
font_names.sort(); font_names.sort();
font_names font_names
}; };