File tree 1 file changed +16
-10
lines changed 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -567,16 +567,22 @@ impl Frame {
567
567
info. image_rendering ) ;
568
568
}
569
569
SpecificDisplayItem :: Text ( ref text_info) => {
570
- let instance = context. resource_cache . get_font_instance ( text_info. font_key ) . unwrap ( ) ;
571
- context. builder . add_text ( clip_and_scroll,
572
- reference_frame_relative_offset,
573
- item_rect_with_offset,
574
- & clip_with_offset,
575
- instance,
576
- & text_info. color ,
577
- item. glyphs ( ) ,
578
- item. display_list ( ) . get ( item. glyphs ( ) ) . count ( ) ,
579
- text_info. glyph_options ) ;
570
+ match context. resource_cache . get_font_instance ( text_info. font_key ) {
571
+ Some ( instance) => {
572
+ context. builder . add_text ( clip_and_scroll,
573
+ reference_frame_relative_offset,
574
+ item_rect_with_offset,
575
+ & clip_with_offset,
576
+ instance,
577
+ & text_info. color ,
578
+ item. glyphs ( ) ,
579
+ item. display_list ( ) . get ( item. glyphs ( ) ) . count ( ) ,
580
+ text_info. glyph_options ) ;
581
+ }
582
+ None => {
583
+ warn ! ( "Unknown font instance key: {:?}" , text_info. font_key) ;
584
+ }
585
+ }
580
586
}
581
587
SpecificDisplayItem :: Rectangle ( ref info) => {
582
588
if !self . try_to_add_rectangle_splitting_on_clip ( context,
You can’t perform that action at this time.
0 commit comments