sort the fonts

This commit is contained in:
Chris Cochrun 2026-02-13 17:27:29 -06:00
parent 560e922fed
commit 3139bd3488

View file

@ -187,8 +187,13 @@ impl SongEditor {
pub fn new(font_db: Arc<fontdb::Database>) -> Self {
let fonts = font_dir();
debug!(?fonts);
let fonts: Vec<Face> =
font_db.faces().map(|f| Face(f.clone())).collect();
let fonts: Vec<Face> = font_db
.faces()
.sorted_by(|a, b| {
Ord::cmp(&a.families[0].0, &b.families[0].0)
})
.map(|f| Face(f.clone()))
.collect();
let stroke_sizes = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let font_sizes = vec![
"5".to_string(),