File tree 1 file changed +3
-5
lines changed 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -387,20 +387,18 @@ fn get_attrs<'a>(
387
387
. or_insert_with ( || {
388
388
let font = fonts. get ( font_handle) . unwrap ( ) ;
389
389
let data = Arc :: clone ( & font. data ) ;
390
- font_system
390
+ let ids = font_system
391
391
. db_mut ( )
392
392
. load_font_source ( cosmic_text:: fontdb:: Source :: Binary ( data) ) ;
393
393
// TODO: it is assumed this is the right font face
394
- // see https://github.com/pop-os/cosmic-text/issues/125
395
- // fontdb 0.14 returns the font ids from `load_font_source`
396
- let face_id = font_system. db ( ) . faces ( ) . last ( ) . unwrap ( ) . id ;
394
+ ids. last ( ) . unwrap ( ) . clone ( )
395
+
397
396
// TODO: below may be required if we need to offset by the baseline (TBC)
398
397
// see https://github.com/pop-os/cosmic-text/issues/123
399
398
// let font = font_system.get_font(face_id).unwrap();
400
399
// map_font_id_to_metrics
401
400
// .entry(face_id)
402
401
// .or_insert_with(|| font.as_swash().metrics(&[]));
403
- face_id
404
402
} ) ;
405
403
let face = font_system. db ( ) . face ( * face_id) . unwrap ( ) ;
406
404
You can’t perform that action at this time.
0 commit comments