Skip to main content

CharstringContext

Trait CharstringContext 

Source
pub trait CharstringContext {
    // Required methods
    fn kind(&self) -> CharstringKind;
    fn seac_components(
        &self,
        base_code: i32,
        accent_code: i32,
    ) -> Result<[&[u8]; 2], Error>;
    fn global_subr(&self, index: i32) -> Result<&[u8], Error>;
    fn subr(&self, index: i32) -> Result<&[u8], Error>;

    // Provided method
    fn weight_vector(&self) -> &[Fixed] { ... }
}
Expand description

Trait that provides context for charstring evaluation.

Required Methods§

Source

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>

Returns the base and accent charstrings for the seac (standard encoded accented character) operator.

Source

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 subr(&self, index: i32) -> Result<&[u8], Error>

Returns the charstring for the local subroutine at the given index as encoded in the calling charstring.

Provided Methods§

Source

fn weight_vector(&self) -> &[Fixed]

Returns the current active weight vector for a multiple master font.

Implementations on Foreign Types§

Source§

impl<'a> CharstringContext for (&'a [u8], &'a Index<'a>, &'a Index<'a>, &'a Index<'a>)

Source§

fn kind(&self) -> CharstringKind

Source§

fn seac_components( &self, base_code: i32, accent_code: i32, ) -> Result<[&[u8]; 2], Error>

Source§

fn global_subr(&self, index: i32) -> Result<&[u8], Error>

Source§

fn subr(&self, index: i32) -> Result<&[u8], Error>

Implementors§