pub enum DropoutControl {
Ignore,
Simple,
SimpleWithStubs,
Smart,
SmartWithStubs,
}Expand description
The dropout control mode for a bilevel rasterizer.
Dropout control defines how to treat features too thin to register on the
pixel grid. A TrueType glyph program selects the mode with the SCANCTRL
and SCANTYPE instructions, and may select a different mode for each
glyph. It affects only rasterization to one bit per pixel. An antialiasing
rasterizer uses coverage and does not need it.
See https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions#scan-conversion-control.
Variants§
Ignore
Fills only pixels whose centers are covered. Thin features may vanish.
Simple
Restores a dropped feature that crosses a scan line, ignoring stubs.
This is the default when a glyph program does not set a mode.
SimpleWithStubs
Like Self::Simple, but also restores stubs.
Smart
Restores a dropped feature at the best position chosen by the scan converter rather than a fixed one, ignoring stubs.
SmartWithStubs
Like Self::Smart, but also restores stubs.
Implementations§
Source§impl DropoutControl
impl DropoutControl
Sourcepub fn is_enabled(self) -> bool
pub fn is_enabled(self) -> bool
Returns true if dropped features should be restored.
Sourcepub fn is_smart(self) -> bool
pub fn is_smart(self) -> bool
Returns true if the scan converter should choose the restore position.
Sourcepub fn includes_stubs(self) -> bool
pub fn includes_stubs(self) -> bool
Returns true if stubs should be restored along with crossing features.
Trait Implementations§
Source§impl Clone for DropoutControl
impl Clone for DropoutControl
Source§fn clone(&self) -> DropoutControl
fn clone(&self) -> DropoutControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more