pub struct FontAtlas { /* private fields */ }Implementations§
Source§impl FontAtlas
impl FontAtlas
pub fn new(inner: impl Atlas + 'static) -> FontAtlas
pub fn get_glyph_id(&self, key: &str, style_bits: u16) -> Option<u16>
pub fn get_base_glyph_id(&self, key: &str) -> Option<u16>
pub fn cell_size(&self) -> (i32, i32)
pub fn bind(&self, gl: &Context)
pub fn underline(&self) -> LineDecoration
pub fn strikethrough(&self) -> LineDecoration
pub fn get_symbol(&self, glyph_id: u16) -> Option<CompactString>
pub fn get_ascii_char(&self, glyph_id: u16) -> Option<char>
pub fn glyph_tracker(&self) -> &GlyphTracker
pub fn glyph_count(&self) -> u32
pub fn recreate_texture(&mut self, gl: &Context) -> Result<(), Error>
pub fn for_each_symbol(&self, f: &mut dyn FnMut(u16, &str))
pub fn resolve_glyph_slot( &self, key: &str, style_bits: u16, ) -> Option<GlyphSlot>
pub fn flush(&self, gl: &Context) -> Result<(), Error>
Sourcepub fn delete(&self, gl: &Context)
pub fn delete(&self, gl: &Context)
Deletes the GPU texture resources associated with this atlas.
Sourcepub fn update_pixel_ratio(
&mut self,
gl: &Context,
pixel_ratio: f32,
) -> Result<f32, Error>
pub fn update_pixel_ratio( &mut self, gl: &Context, pixel_ratio: f32, ) -> Result<f32, Error>
Updates the pixel ratio for HiDPI rendering.
Returns the effective pixel ratio to use for viewport scaling.
Sourcepub fn cell_scale_for_dpr(&self, pixel_ratio: f32) -> f32
pub fn cell_scale_for_dpr(&self, pixel_ratio: f32) -> f32
Returns the cell scale factor for layout calculations.
Sourcepub fn texture_cell_size(&self) -> (i32, i32)
pub fn texture_cell_size(&self) -> (i32, i32)
Returns the texture cell size in physical pixels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FontAtlas
impl !RefUnwindSafe for FontAtlas
impl !Send for FontAtlas
impl !Sync for FontAtlas
impl Unpin for FontAtlas
impl UnsafeUnpin for FontAtlas
impl !UnwindSafe for FontAtlas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more