MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / load_font

Method load_font

native/shared/src/text_renderer.rs:140–145  ·  view source on GitHub ↗
(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

138 }
139
140 pub fn load_font(&mut self, data: &[u8]) -> usize {
141 let font = Font::from_bytes(data, FontSettings::default())
142 .expect("Failed to load font");
143 self.fonts.push(font);
144 self.fonts.len() - 1
145 }
146
147 fn rasterize_glyph(&mut self, font_idx: usize, ch: char, size: u32) -> &GlyphInfo {
148 let key = (font_idx, ch, size);

Callers 7

bloom_load_fontFunction · 0.80
bloom_load_fontFunction · 0.80
bloom_load_fontFunction · 0.80
bloom_load_fontFunction · 0.80
bloom_load_fontFunction · 0.80
bloom_load_font_bytesFunction · 0.80
bloom_load_fontFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected