pub trait CommandSink {
    // Required methods
    fn move_to(&mut self, x: Fixed, y: Fixed);
    fn line_to(&mut self, x: Fixed, y: Fixed);
    fn curve_to(
        &mut self,
        cx0: Fixed,
        cy0: Fixed,
        cx1: Fixed,
        cy1: Fixed,
        x: Fixed,
        y: Fixed,
    );
    fn close(&mut self);
    // Provided methods
    fn hstem(&mut self, y: Fixed, dy: Fixed) { ... }
    fn vstem(&mut self, x: Fixed, dx: Fixed) { ... }
    fn hint_mask(&mut self, mask: &[u8]) { ... }
    fn counter_mask(&mut self, mask: &[u8]) { ... }
}Expand description
Trait for processing commands resulting from charstring evaluation.
During processing, the path construction operators (see “4.1 Path Construction Operators” at https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf#page=15) are simplified into the basic move, line, curve and close commands.
This also has optional callbacks for processing hint operators. See “4.3 Hint Operators” at https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf#page=21 for more detail.
Required Methods§
fn move_to(&mut self, x: Fixed, y: Fixed)
fn line_to(&mut self, x: Fixed, y: Fixed)
fn curve_to( &mut self, cx0: Fixed, cy0: Fixed, cx1: Fixed, cy1: Fixed, x: Fixed, y: Fixed, )
fn close(&mut self)
Provided Methods§
Sourcefn hint_mask(&mut self, mask: &[u8])
 
fn hint_mask(&mut self, mask: &[u8])
Bitmask defining the hints that should be made active for the commands that follow.
Sourcefn counter_mask(&mut self, mask: &[u8])
 
fn counter_mask(&mut self, mask: &[u8])
Bitmask defining the counter hints that should be made active for the commands that follow.