pub fn from_fonts(fonts: Vec<(&'static str, ab_glyph::FontArc)>, device: &wgpu::Device, render_format: wgpu::TextureFormat) -> Self {
        let mut font_map = HashMap::new();

        let brush = GlyphBrushBuilder::using_fonts(
            fonts.into_iter().enumerate().map(|(index, (alias, font))| {
                font_map.insert(alias, FontId(index));
                font
            }).collect()
        ).build(device, render_format);

        Self {
            brush,
            fonts: font_map,
        }
    }
// TODO: Ensure that this accounts for FontId properly
/// For use with the `include_fonts!` macro
Ensure that this accounts for FontId properly
For use with the `include_fonts!` macro
Ensure that this accounts for FontId properly For use with the ` include_fonts! ` macro
pub fn from_fonts(fonts: Vec<(&'static str, ab_glyph::FontArc)>, device: &wgpu::Device, render_format: wgpu::TextureFormat) -> Self {
        let mut font_map = HashMap::new();
        let brush = GlyphBrushBuilder::using_fonts(
            fonts.into_iter().enumerate().map(|(index, (alias, font))| {
                font_map.insert(alias, FontId(index));
                font
            }).collect()
        ).build(device, render_format);
        Self {
            brush,
            fonts: font_map,
        }
    }
pub fn from_fonts ( fonts : Vec < ( & ' static str , ab_glyph :: FontArc ) > , device : & wgpu :: Device , render_format : wgpu :: TextureFormat ) -> Self { let mut font_map = HashMap :: new ( ) ; let brush = GlyphBrushBuilder :: using_fonts ( fonts . into_iter ( ) . enumerate ( ) . map ( | ( index , ( alias , font ) ) | { font_map . insert ( alias , FontId ( index ) ) ; font } ) . collect ( ) ) . build ( device , render_format ) ; Self { brush , fonts : font_map , } }
TODO: Ensure that this accounts for FontId properly
For use with the `include_fonts!` macro
TODO : Ensure that this accounts for FontId properly For use with the ` include_fonts! ` macro
fonts
Vec<(&'static str, ab_glyph::FontArc)>
device
&wgpu::Device
render_format
wgpu::TextureFormat
fonts
Vec<(&'static str, ab_glyph::FontArc)>
device
&wgpu::Device
render_format
wgpu::TextureFormat