pub struct Type1Instance<'a> {
font: &'a Type1Font,
weights: &'a [Fixed],
}Expand description
A Type 1 font drawn with a given blend of its masters.
For a multiple master font, the weights give the blend, one per master.
MultipleMaster::blend_to_weights computes them for a position in the
blend space. A font with no masters takes empty weights.
Fields§
§font: &'a Type1Font§weights: &'a [Fixed]Implementations§
Source§impl<'a> Type1Instance<'a>
impl<'a> Type1Instance<'a>
Sourcepub fn evaluate_width(&self, gid: GlyphId) -> Result<Option<Fixed>, Error>
pub fn evaluate_width(&self, gid: GlyphId) -> Result<Option<Fixed>, Error>
As Type1Font::evaluate_width, with this instance’s blend.
Sourcepub fn evaluate_charstring(
&self,
gid: GlyphId,
sink: &mut impl CommandSink,
) -> Result<Option<Fixed>, Error>
pub fn evaluate_charstring( &self, gid: GlyphId, sink: &mut impl CommandSink, ) -> Result<Option<Fixed>, Error>
As Type1Font::evaluate_charstring, with this instance’s blend.
Sourcepub fn advance(
&self,
gid: GlyphId,
ppem: Option<f32>,
) -> Result<Option<f32>, Error>
pub fn advance( &self, gid: GlyphId, ppem: Option<f32>, ) -> Result<Option<f32>, Error>
As Type1Font::advance, with this instance’s blend.
Sourcepub fn evaluate_extents(
&self,
gid: GlyphId,
) -> Result<Option<BoundingBox<Fixed>>, Error>
pub fn evaluate_extents( &self, gid: GlyphId, ) -> Result<Option<BoundingBox<Fixed>>, Error>
As Type1Font::evaluate_extents, with this instance’s blend.
Trait Implementations§
Source§impl CharstringContext for Type1Instance<'_>
impl CharstringContext for Type1Instance<'_>
Source§fn kind(&self) -> CharstringKind
fn kind(&self) -> CharstringKind
Returns the type of the charstring.
Source§fn seac_components(
&self,
base_code: i32,
accent_code: i32,
) -> Result<[&[u8]; 2], Error>
fn seac_components( &self, base_code: i32, accent_code: i32, ) -> Result<[&[u8]; 2], Error>
Returns the base and accent charstrings for the
seac (standard
encoded accented character) operator.Source§fn subr(&self, index: i32) -> Result<&[u8], Error>
fn subr(&self, index: i32) -> Result<&[u8], Error>
Returns the charstring for the local subroutine at the given index as
encoded in the calling charstring.
Source§fn global_subr(&self, index: i32) -> Result<&[u8], Error>
fn global_subr(&self, index: i32) -> Result<&[u8], Error>
Returns the charstring for the global subroutine at the given index as
encoded in the calling charstring.
Source§fn weight_vector(&self) -> &[Fixed]
fn weight_vector(&self) -> &[Fixed]
Returns the current active weight vector for a multiple master font.
Source§fn build_char_len(&self) -> usize
fn build_char_len(&self) -> usize
Returns the number of elements in the
BuildCharArray of a multiple
master font, which othersubrs read and write.Source§impl<'a> Clone for Type1Instance<'a>
impl<'a> Clone for Type1Instance<'a>
Source§fn clone(&self) -> Type1Instance<'a>
fn clone(&self) -> Type1Instance<'a>
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 moreimpl<'a> Copy for Type1Instance<'a>
Auto Trait Implementations§
impl<'a> Freeze for Type1Instance<'a>
impl<'a> RefUnwindSafe for Type1Instance<'a>
impl<'a> Send for Type1Instance<'a>
impl<'a> Sync for Type1Instance<'a>
impl<'a> Unpin for Type1Instance<'a>
impl<'a> UnsafeUnpin for Type1Instance<'a>
impl<'a> UnwindSafe for Type1Instance<'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