pub enum GlyphRaster {
Smooth,
Pixel,
}Expand description
Which grid the glyphs are rasterized onto.
An axis of the style, like weight or slant — not a mode the whole renderer enters. Shaping, wrapping, bidi and the font stack are the same either way; only where a glyph lands and how its coverage is resolved change.
Variants§
Smooth
Subpixel origins and blended coverage: the sharpest text a screen can show at UI sizes.
Pixel
Whole-pixel origins and coverage resolved to on or off.
What a font drawn on a pixel grid needs: a glyph shared between two columns, or an edge left half-lit, is the grid the artist drew being taken apart. With a face designed at the size it is used, this reproduces a bitmap font’s output without Telar growing a second font format — cosmic-text still shapes, wraps and falls back exactly as before.
Trait Implementations§
Source§impl Clone for GlyphRaster
impl Clone for GlyphRaster
Source§fn clone(&self) -> GlyphRaster
fn clone(&self) -> GlyphRaster
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GlyphRaster
Source§impl Debug for GlyphRaster
impl Debug for GlyphRaster
Source§impl Default for GlyphRaster
impl Default for GlyphRaster
Source§fn default() -> GlyphRaster
fn default() -> GlyphRaster
Returns the “default value” for a type. Read more
impl Eq for GlyphRaster
Source§impl Hash for GlyphRaster
impl Hash for GlyphRaster
Source§impl PartialEq for GlyphRaster
impl PartialEq for GlyphRaster
impl StructuralPartialEq for GlyphRaster
Auto Trait Implementations§
impl Freeze for GlyphRaster
impl RefUnwindSafe for GlyphRaster
impl Send for GlyphRaster
impl Sync for GlyphRaster
impl Unpin for GlyphRaster
impl UnsafeUnpin for GlyphRaster
impl UnwindSafe for GlyphRaster
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