File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,8 @@ impl Default for SwashCache {
7272pub struct TextPipeline {
7373 /// Identifies a font [`ID`](cosmic_text::fontdb::ID) by its [`Font`] [`Asset`](bevy_asset::Asset) [`HandleId`].
7474 map_handle_to_font_id : HashMap < AssetId < Font > , cosmic_text:: fontdb:: ID > ,
75- /// Identifies a [`FontAtlasSet`] handle by its font [`ID`](cosmic_text::fontdb::ID).
76- ///
77- /// Note that this is a strong handle, so that textures are not dropped.
78- map_font_id_to_handle : HashMap < cosmic_text:: fontdb:: ID , Handle < FontAtlasSet > > ,
75+ /// Identifies a [`FontAtlasSet`] by its font [`ID`](cosmic_text::fontdb::ID).
76+ map_font_id_to_atlas : HashMap < cosmic_text:: fontdb:: ID , FontAtlasSet > ,
7977 /// The font system is used to retrieve fonts and their information, including glyph outlines.
8078 ///
8179 /// See [`cosmic_text::FontSystem`] for more information.
@@ -303,12 +301,11 @@ impl TextPipeline {
303301 weight : query. weight ,
304302 metadata : 0 ,
305303 } ) [ 0 ] ;
306- let handle = self
307- . map_font_id_to_handle
304+ let atlas = self
305+ . map_font_id_to_atlas
308306 . entry ( font_id)
309307 . or_default ( ) ;
310-
311- font_atlas_sets. get_mut ( handle. clone ( ) . untyped ( ) . id ( ) ) . unwrap ( )
308+ atlas
312309 }
313310 } ;
314311
You can’t perform that action at this time.
0 commit comments