Skip to main content

EmptyFontPlatform

Struct EmptyFontPlatform 

Source
pub struct EmptyFontPlatform;

Trait Implementations§

Source§

impl Default for EmptyFontPlatform

Source§

fn default() -> Self

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

impl FontPlatform for EmptyFontPlatform

Source§

fn resolve_font_handle( &mut self, _name: &[i32], _size: i32, ) -> Option<PortableFontHandle>

Source§

fn release_font_handle(&mut self, _font: PortableFontHandle, _type_flag: i32)

Source§

fn font_table(&self) -> Vec<(PortableFontHandle, String, i32)>

Snapshot the platform’s native-font table as (handle, spec, size) tuples. A serialized format image keeps integer font handles in fontlayoutengine, but those handles only mean something to the platform that minted them; capturing the table lets a cold load rebind them.
Source§

fn restore_font_table( &mut self, _table: &[(PortableFontHandle, String, i32)], ) -> bool

Rebuild the native-font table from a Self::font_table snapshot, (re)loading each font at its original handle so the fontlayoutengine handles preserved in a reloaded format image resolve again. Returns false if any font failed to load.
Source§

fn font_metrics(&mut self, _font: PortableFontHandle) -> PortableFontMetrics

Source§

fn opentype_font_metrics( &mut self, font: PortableFontHandle, ) -> PortableFontMetrics

Source§

fn is_opentype_math_font(&mut self, _font: PortableFontHandle) -> bool

Source§

fn using_opentype(&mut self, _font: PortableFontHandle) -> bool

Whether font is shaped through the OpenType (HarfBuzz/rustybuzz) shaper. Mirrors XeTeX’s usingOpenType, which is true for the "ot" shaper (the default). This engine always shapes native fonts with rustybuzz, so any loaded native font handle returns true.
Source§

fn math_symbol_parameter( &mut self, _font: PortableFontHandle, _parameter: i32, ) -> i32

Source§

fn math_extension_parameter( &mut self, _font: PortableFontHandle, _parameter: i32, ) -> i32

Source§

fn opentype_math_constant( &mut self, _font: PortableFontHandle, _constant: i32, ) -> i32

Source§

fn opentype_math_accent_position( &mut self, _font: PortableFontHandle, _glyph: i32, ) -> i32

Source§

fn math_glyph_italic_correction( &mut self, _font: PortableFontHandle, _glyph: i32, ) -> i32

OpenType MATH italic correction for a glyph, in scaled points.
Source§

fn math_glyph_variant( &mut self, _font: PortableFontHandle, _glyph: i32, _index: u16, _horizontal: bool, ) -> Option<PortableMathVariant>

The index-th larger MATH glyph variant of glyph (horizontal or vertical), or None when there is no such variant. The advance is in scaled points.
Source§

fn math_glyph_assembly( &mut self, _font: PortableFontHandle, _glyph: i32, _horizontal: bool, ) -> Vec<PortableMathAssemblyPart>

The MATH glyph-assembly parts for glyph (horizontal or vertical), each metric in scaled points. Empty when the glyph has no assembly.
Source§

fn math_min_connector_overlap(&mut self, _font: PortableFontHandle) -> i32

The MATH minimum connector overlap for assembly parts, in scaled points.
Source§

fn math_kern_at( &mut self, _font: PortableFontHandle, _glyph: i32, _corner: PortableMathKernCorner, _correction_height: i32, ) -> i32

One MATH MathKernInfo corner evaluated at correction_height (font design units), returned in raw font design units (NOT scaled).
Source§

fn math_points_to_units( &mut self, _font: PortableFontHandle, _points: f32, ) -> f32

Convert a measurement in points to font design units for font (pointsToUnits).
Source§

fn math_units_to_scaled( &mut self, _font: PortableFontHandle, _units: i32, ) -> i32

Convert a measurement in font design units to scaled points for font (D2Fix(unitsToPoints(...))).
Source§

fn math_point_size(&mut self, _font: PortableFontHandle) -> f32

The point size at which font was loaded (getPointSize).
Source§

fn map_char_to_glyph( &mut self, _font: PortableFontHandle, _codepoint: i32, ) -> i32

Source§

fn map_glyph_to_index(&mut self, _font: PortableFontHandle, _name: &str) -> i32

Source§

fn ot_font_get( &mut self, _font: PortableFontHandle, _what: i32, _param1: i32, _param2: i32, _param3: i32, ) -> i32

OpenType layout enumeration backing the \XeTeXOT* / \XeTeXcountglyphs last_item primitives (XeTeX ot_font_get/_1/_2/_3). what is the XeTeX_ext code (1 = count glyphs, 16 = count scripts, 17 = count languages, 18 = count features, 19 = script tag, 20 = language tag, 21 = feature tag); unused params are 0.
Source§

fn font_spec(&self, _font: PortableFontHandle) -> Option<String>

The \font spec string a loaded handle was created from (e.g. [latinmodern-math.otf]:script=math;ssty=1). Immutable so the read-only IR-building path can recover the originating font file for a glyph run.
Source§

fn shape_native_text( &mut self, _font: PortableFontHandle, _text: &[u16], _use_glyph_metrics: bool, ) -> PortableNativeTextMetrics

Source§

fn measure_native_glyph( &mut self, _font: PortableFontHandle, _glyph: u16, _use_glyph_metrics: bool, ) -> PortableNativeGlyphMetrics

Auto Trait Implementations§

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, 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.