#[non_exhaustive]pub struct DrawnMetrics {
pub h_advance: Option<f32>,
pub x_bearing: Option<f32>,
pub has_overlaps: bool,
pub dropout_control: DropoutControl,
}Expand description
What drawing an outline reports about it.
Values are in the units the outline was drawn in: pixels at a size, font units otherwise. Hinting may adjust the advance and bearing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.h_advance: Option<f32>The horizontal advance, if the outline provides one.
A glyf outline provides it through its phantom points, with
variations applied. A charstring provides it directly. A VARC
composite has none.
x_bearing: Option<f32>The left side bearing, if the outline provides one.
Only a glyf outline provides it, through its phantom points. A
hinter that does not move phantom points, such as an automatic
hinter, may not report it.
has_overlaps: boolTrue if the glyph is flagged as having overlapping contours or components.
Only glyf has these flags.
dropout_control: DropoutControlThe dropout control mode requested by the glyph program.
This tells a bilevel rasterizer how to treat features thinner than a
pixel. It is DropoutControl::Simple, the TrueType default, when
no TrueType hinter ran. When one ran, it is the mode the font’s
programs left, and DropoutControl::Ignore if they never turned
dropout control on.
Trait Implementations§
Source§impl Clone for DrawnMetrics
impl Clone for DrawnMetrics
Source§fn clone(&self) -> DrawnMetrics
fn clone(&self) -> DrawnMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more