File tree 1 file changed +13
-10
lines changed 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -567,16 +567,19 @@ 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
+ if let Some ( instance) = context. resource_cache . get_font_instance ( text_info. font_key ) {
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 ) ;
580
+ } else {
581
+ debug ! ( "Unknown font instance key: {:?}" , text_info. font_key) ;
582
+ }
580
583
}
581
584
SpecificDisplayItem :: Rectangle ( ref info) => {
582
585
if !self . try_to_add_rectangle_splitting_on_clip ( context,
You can’t perform that action at this time.
0 commit comments