Skip to main content

OwnedFontMetrics

Type Alias OwnedFontMetrics 

Source
pub type OwnedFontMetrics = FontMetrics<'static>;
Expand description

Fully owned AFM data that can outlive the original input.

Aliased Type§

pub struct OwnedFontMetrics {
Show 30 fields pub afm_version: Cow<'static, str>, pub font_name: Cow<'static, str>, pub font_bbox: BBox, pub metrics_sets: Option<MetricsSets>, pub full_name: Option<Cow<'static, str>>, pub family_name: Option<Cow<'static, str>>, pub weight: Option<Cow<'static, str>>, pub version: Option<Cow<'static, str>>, pub notice: Option<Cow<'static, str>>, pub encoding_scheme: Option<Cow<'static, str>>, pub character_set: Option<Cow<'static, str>>, pub mapping_scheme: Option<u32>, pub esc_char: Option<u8>, pub characters: Option<u32>, pub is_base_font: Option<bool>, pub is_cid_font: Option<bool>, pub v_vector: Option<Vector>, pub is_fixed_v: Option<bool>, pub cap_height: Option<f32>, pub x_height: Option<f32>, pub ascender: Option<f32>, pub descender: Option<f32>, pub std_hw: Option<f32>, pub std_vw: Option<f32>, pub directions: [DirectionMetrics; 2], pub character_metrics: Cow<'static, [CharacterMetric<'static>]>, pub kerning_pairs: Cow<'static, [KerningPair<'static>]>, pub track_kerns: Cow<'static, [TrackKern]>, pub composites: Cow<'static, [Composite<'static>]>, pub source_records: Cow<'static, [SourceRecord<'static>]>,
}

Fields§

§afm_version: Cow<'static, str>

AFM format version from the header.

§font_name: Cow<'static, str>

Required font program name.

§font_bbox: BBox

Required font bounding box.

§metrics_sets: Option<MetricsSets>

Declared writing directions; absence implies direction 0.

§full_name: Option<Cow<'static, str>>

Full display name.

§family_name: Option<Cow<'static, str>>

Typeface family.

§weight: Option<Cow<'static, str>>

Weight description.

§version: Option<Cow<'static, str>>

Font program version, distinct from the AFM format version.

§notice: Option<Cow<'static, str>>

Font notice or copyright text.

§encoding_scheme: Option<Cow<'static, str>>

Default encoding description.

§character_set: Option<Cow<'static, str>>

Glyph complement description.

§mapping_scheme: Option<u32>

Encoding mapping selector.

§esc_char: Option<u8>

Escape byte for an escape-mapped font.

§characters: Option<u32>

Declared total glyph count, independent of the character-metric section count.

§is_base_font: Option<bool>

Authored base-font flag; absence implies true.

§is_cid_font: Option<bool>

Authored CID-keyed font flag.

§v_vector: Option<Vector>

Global displacement between writing origins.

§is_fixed_v: Option<bool>

Authored fixed-origin-vector flag.

§cap_height: Option<f32>

Capital height.

§x_height: Option<f32>

Lowercase x height.

§ascender: Option<f32>

Ascender height.

§descender: Option<f32>

Descender depth, typically negative.

§std_hw: Option<f32>

Dominant horizontal stem width.

§std_vw: Option<f32>

Dominant vertical stem width.

§directions: [DirectionMetrics; 2]

Metrics for directions 0 and 1; shared blocks populate both.

§character_metrics: Cow<'static, [CharacterMetric<'static>]>

All character records in source order.

§kerning_pairs: Cow<'static, [KerningPair<'static>]>

All named/hexadecimal pairs in source order, with direction identity.

§track_kerns: Cow<'static, [TrackKern]>

Track-kerning records in source order.

§composites: Cow<'static, [Composite<'static>]>

Composite construction recipes in source order.

§source_records: Cow<'static, [SourceRecord<'static>]>

Comments and uninterpreted records, including unmodeled multiple-master arrays.