pub struct CffGlyph<'a> {
pub(super) cff: &'a CffFontRef<'a>,
pub(super) coords: &'a [F2Dot14],
pub(super) glyph: GlyphId,
pub(super) subfont_index: u16,
pub(super) subfont: Subfont,
pub(super) source: OutlineSource,
}Expand description
A CFF or CFF2 charstring from a Font, with
its subfont.
Fields§
§cff: &'a CffFontRef<'a>§coords: &'a [F2Dot14]§glyph: GlyphId§subfont_index: u16§subfont: Subfont§source: OutlineSourceImplementations§
Source§impl<'a> CffGlyph<'a>
impl<'a> CffGlyph<'a>
Sourcepub fn source(&self) -> OutlineSource
pub fn source(&self) -> OutlineSource
Returns the table that contains the charstring, either CFF or
CFF2.
Sourcepub fn cff_font(&self) -> &'a CffFontRef<'a>
pub fn cff_font(&self) -> &'a CffFontRef<'a>
Returns the CFF or CFF2 font that evaluates the charstring.
Sourcepub fn normalized_coords(&self) -> &'a [NormalizedCoord] ⓘ
pub fn normalized_coords(&self) -> &'a [NormalizedCoord] ⓘ
Returns the normalized variation coordinates used to evaluate the charstring.
Sourcepub fn subfont_index(&self) -> u32
pub fn subfont_index(&self) -> u32
Returns the index of the glyph’s subfont.
Sourcepub fn subfont(&self) -> &Subfont
pub fn subfont(&self) -> &Subfont
Returns the glyph’s subfont, parsed at normalized_coords.
For hinting, use CffFontRef::subfont_hinted with the same index
to also read the hinting parameters.
Sourcepub(super) fn draw(
&self,
options: &DrawOptions,
sink: &mut dyn PathSink,
) -> Result<DrawnMetrics, Error>
pub(super) fn draw( &self, options: &DrawOptions, sink: &mut dyn PathSink, ) -> Result<DrawnMetrics, Error>
Draws the charstring and returns its width, which can be negative.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CffGlyph<'a>
impl<'a> RefUnwindSafe for CffGlyph<'a>
impl<'a> Send for CffGlyph<'a>
impl<'a> Sync for CffGlyph<'a>
impl<'a> Unpin for CffGlyph<'a>
impl<'a> UnsafeUnpin for CffGlyph<'a>
impl<'a> UnwindSafe for CffGlyph<'a>
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