Skip to main content

Fonts

Struct Fonts 

Source
pub struct Fonts<'a> {
    pub sources: Vec<C8FontSource<Box<dyn RangedSource + 'a>>>,
    pub roles: Option<C8PageFonts>,
    pub embedding: FontEmbedding,
    pub glyph_aliases: Vec<NativeFontGlyphAlias>,
    pub symbol_glyphs: Vec<NativeSymbolGlyph>,
    pub symbol_font: Option<SymbolFontIdentity>,
    pub decoration_glyphs: Vec<NativeDecorationGlyph>,
    pub decoration_font: Option<SymbolFontIdentity>,
}
Expand description

Font resources for native HN/C8 text.

Up to eleven ranged resources and their collection faces; roles index into sources, and several roles may share one resource. Absent optional roles and unmapped characters follow the C8PageFonts fallback rule.

Fields§

§sources: Vec<C8FontSource<Box<dyn RangedSource + 'a>>>§roles: Option<C8PageFonts>

Which source draws each role; sources without roles are refused.

§embedding: FontEmbedding

Used program preservation; defaults to compact subsets.

§glyph_aliases: Vec<NativeFontGlyphAlias>

Ordinary glyph aliases, strictly sorted by source index and character.

§symbol_glyphs: Vec<NativeSymbolGlyph>

Explicit source glyphs for HN-B mode-0 symbol codes, drawn from the symbols role without fallback. Semantic text is unchanged. Native documents of another profile refuse a non-empty map; like the fonts, it is unread for documents routed to image composition.

§symbol_font: Option<SymbolFontIdentity>

The font symbol_glyphs was measured on; a different symbols font is refused. Requires a nonempty map.

§decoration_glyphs: Vec<NativeDecorationGlyph>

Explicit nonsemantic decoration aliases for native mode 2.

§decoration_font: Option<SymbolFontIdentity>

Expected decoration font identity; requires a nonempty decoration map.

Trait Implementations§

Source§

impl<'a> Default for Fonts<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Fonts<'a>

§

impl<'a> !Send for Fonts<'a>

§

impl<'a> !Sync for Fonts<'a>

§

impl<'a> !UnwindSafe for Fonts<'a>

§

impl<'a> Freeze for Fonts<'a>

§

impl<'a> Unpin for Fonts<'a>

§

impl<'a> UnsafeUnpin for Fonts<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.