Struct kas_text::raster::Config [−][src]
pub struct Config { /* fields omitted */ }Expand description
Raster configuration
Implementations
Construct configuration
For large glyphs the effects of configuration will be mostly unnoticable but for small glyphs effects are more significant. The defaults will usually be a good choice. Results may depend on the font used.
The mode parameter selects rendering mode (though depending on crate
features, not all renderers will be available):
mode == 0(default): useab_glyphfor rasteringmode == 1: useab_glyphand align glyphs to side bearingsmode == 2: usefontduefor rastering
Fonts sizes, in pixels per Em, are rounded to a multiple of 1 / scale_steps.
The default is scale_steps == 4.
For font sizes (in pixels per Em) less than subpixel_threshold, subpixel positioning is
enabled with subpixel_steps (supporting between 1 and 16 steps). Subpixel positioning
potentially allows better glyph spacing for small fonts, but tends to reduce rendering
quality. By default subpixel_threshold == 0 (disabling the feature) and
subpixel_steps == 5. Odd values of subpixel_steps appear to produce better results.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Configimpl UnwindSafe for ConfigBlanket Implementations
Mutably borrows from an owned value. Read more
Cast to integer, truncating Read more
Cast to the nearest integer Read more
Cast the floor to an integer Read more
Try converting to integer with truncation Read more
Try converting to the nearest integer Read more
Try converting the floor to an integer Read more
Try convert the ceiling to an integer Read more