pub struct TextBuilderSettings {
pub default_font_scale: f32,
pub default_line_height: f32,
pub cache_atlas_min_size: u32,
pub cache_atlas_max_size: u32,
pub cache_atlas_glyph_padding: u32,
pub glyph_alpha_transform: Option<&'static dyn Fn(u8) -> u8>,
pub texture_filter: Interpolation,
}
Expand description
Controls the behaviour of a TextBuilder
and its corresponding GlyphCache
s.
Fields§
§default_font_scale: f32
Default font scale to use - see fontdue::FontSettings
for more details
default_line_height: f32
Default line height scaling to render with
cache_atlas_min_size: u32
Minimum size a glyph cache’s texture starts and is allocated with
cache_atlas_max_size: u32
Maximum size a glyph cache’s texture before no further glyphs are added
cache_atlas_glyph_padding: u32
Number of pixels to be inserted on all sides of a glyph during rasterization; used to prevent UV aliasing artifacts.
glyph_alpha_transform: Option<&'static dyn Fn(u8) -> u8>
Function to modify the pixel alpha values of all glyphs
texture_filter: Interpolation
Texture interpolation used by a glyph cache’s texture
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TextBuilderSettings
impl !Send for TextBuilderSettings
impl !Sync for TextBuilderSettings
impl Unpin for TextBuilderSettings
impl !UnwindSafe for TextBuilderSettings
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