pub struct GeneratedFontSystemAdapter<F> { /* private fields */ }Expand description
Adapter that resolves XeTeX native font requests through a FontSystem.
Implementations§
Source§impl<F> GeneratedFontSystemAdapter<F>
impl<F> GeneratedFontSystemAdapter<F>
Sourcepub fn font_system(&self) -> &F
pub fn font_system(&self) -> &F
Returns a reference to the wrapped font system.
Sourcepub fn into_font_system(self) -> F
pub fn into_font_system(self) -> F
Unwraps and returns the inner font system.
Sourcepub fn loaded_font(&self, handle: GeneratedFontHandle) -> Option<&FontData>
pub fn loaded_font(&self, handle: GeneratedFontHandle) -> Option<&FontData>
Returns the font data for a loaded handle, or None if not found.
Trait Implementations§
Source§impl<F: Clone> Clone for GeneratedFontSystemAdapter<F>
impl<F: Clone> Clone for GeneratedFontSystemAdapter<F>
Source§fn clone(&self) -> GeneratedFontSystemAdapter<F>
fn clone(&self) -> GeneratedFontSystemAdapter<F>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Debug> Debug for GeneratedFontSystemAdapter<F>
impl<F: Debug> Debug for GeneratedFontSystemAdapter<F>
Source§impl<F> FontPlatform for GeneratedFontSystemAdapter<F>where
F: FontSystem,
impl<F> FontPlatform for GeneratedFontSystemAdapter<F>where
F: FontSystem,
fn resolve_font_handle( &mut self, name: &[i32], size: i32, ) -> Option<GeneratedFontHandle>
fn release_font_handle(&mut self, font: GeneratedFontHandle, _type_flag: i32)
Source§fn font_table(&self) -> Vec<(GeneratedFontHandle, String, i32)>
fn font_table(&self) -> Vec<(GeneratedFontHandle, 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: &[(GeneratedFontHandle, String, i32)],
) -> bool
fn restore_font_table( &mut self, table: &[(GeneratedFontHandle, 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.fn font_metrics(&mut self, font: GeneratedFontHandle) -> GeneratedFontMetrics
fn opentype_font_metrics( &mut self, font: GeneratedFontHandle, ) -> GeneratedFontMetrics
fn is_opentype_math_font(&mut self, font: GeneratedFontHandle) -> bool
Source§fn using_opentype(&mut self, font: GeneratedFontHandle) -> bool
fn using_opentype(&mut self, font: GeneratedFontHandle) -> 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.fn math_symbol_parameter( &mut self, font: GeneratedFontHandle, parameter: i32, ) -> i32
fn math_extension_parameter( &mut self, font: GeneratedFontHandle, parameter: i32, ) -> i32
fn opentype_math_constant( &mut self, font: GeneratedFontHandle, constant: i32, ) -> i32
fn opentype_math_accent_position( &mut self, font: GeneratedFontHandle, glyph: i32, ) -> i32
Source§fn math_glyph_italic_correction(
&mut self,
font: GeneratedFontHandle,
glyph: i32,
) -> i32
fn math_glyph_italic_correction( &mut self, font: GeneratedFontHandle, glyph: i32, ) -> i32
OpenType MATH italic correction for a glyph, in scaled points.
Source§fn math_glyph_variant(
&mut self,
font: GeneratedFontHandle,
glyph: i32,
index: u16,
horizontal: bool,
) -> Option<GeneratedMathVariant>
fn math_glyph_variant( &mut self, font: GeneratedFontHandle, glyph: i32, index: u16, horizontal: bool, ) -> Option<GeneratedMathVariant>
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: GeneratedFontHandle,
glyph: i32,
horizontal: bool,
) -> Vec<GeneratedMathAssemblyPart> ⓘ
fn math_glyph_assembly( &mut self, font: GeneratedFontHandle, glyph: i32, horizontal: bool, ) -> Vec<GeneratedMathAssemblyPart> ⓘ
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: GeneratedFontHandle) -> i32
fn math_min_connector_overlap(&mut self, font: GeneratedFontHandle) -> i32
The MATH minimum connector overlap for assembly parts, in scaled points.
Source§fn math_kern_at(
&mut self,
font: GeneratedFontHandle,
glyph: i32,
corner: GeneratedMathKernCorner,
correction_height: i32,
) -> i32
fn math_kern_at( &mut self, font: GeneratedFontHandle, glyph: i32, corner: GeneratedMathKernCorner, 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: GeneratedFontHandle,
points: f32,
) -> f32
fn math_points_to_units( &mut self, font: GeneratedFontHandle, points: f32, ) -> f32
Convert a measurement in points to font design units for
font
(pointsToUnits).Source§fn math_units_to_scaled(&mut self, font: GeneratedFontHandle, units: i32) -> i32
fn math_units_to_scaled(&mut self, font: GeneratedFontHandle, 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: GeneratedFontHandle) -> f32
fn math_point_size(&mut self, font: GeneratedFontHandle) -> f32
The point size at which
font was loaded (getPointSize).fn map_char_to_glyph( &mut self, font: GeneratedFontHandle, codepoint: i32, ) -> i32
fn map_glyph_to_index(&mut self, font: GeneratedFontHandle, name: &str) -> i32
Source§fn ot_font_get(
&mut self,
font: GeneratedFontHandle,
what: i32,
param1: i32,
param2: i32,
param3: i32,
) -> i32
fn ot_font_get( &mut self, font: GeneratedFontHandle, 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: GeneratedFontHandle) -> Option<String>
fn font_spec(&self, font: GeneratedFontHandle) -> 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.fn shape_native_text( &mut self, font: GeneratedFontHandle, text: &[u16], _use_glyph_metrics: bool, ) -> GeneratedNativeTextMetrics
fn measure_native_glyph( &mut self, font: GeneratedFontHandle, glyph: u16, _use_glyph_metrics: bool, ) -> GeneratedNativeGlyphMetrics
Auto Trait Implementations§
impl<F> !RefUnwindSafe for GeneratedFontSystemAdapter<F>
impl<F> !UnwindSafe for GeneratedFontSystemAdapter<F>
impl<F> Freeze for GeneratedFontSystemAdapter<F>where
F: Freeze,
impl<F> Send for GeneratedFontSystemAdapter<F>where
F: Send,
impl<F> Sync for GeneratedFontSystemAdapter<F>where
F: Sync,
impl<F> Unpin for GeneratedFontSystemAdapter<F>where
F: Unpin,
impl<F> UnsafeUnpin for GeneratedFontSystemAdapter<F>where
F: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more