Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skrifa] tthint: managing the graphics state #769

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions skrifa/src/outline/glyf/hint/code_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@ mod args;

pub use args::Args;

/// Describes the source for a piece of bytecode.
#[derive(Copy, Clone, PartialEq, Eq, Default, Debug)]
#[repr(u8)]
pub enum ProgramKind {
/// Program that initializes the function and instruction tables. Stored
/// in the `fpgm` table.
#[default]
Font = 0,
/// Program that initializes CVT and storage based on font size and other
/// parameters. Stored in the `prep` table.
ControlValue = 1,
/// Glyph specified program. Stored per-glyph in the `glyf` table.
Glyph = 2,
}

#[cfg(test)]
pub(crate) use args::MockArgs;
4 changes: 2 additions & 2 deletions skrifa/src/outline/glyf/hint/engine/arith.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Arithmetic and math instructions.
//!
//! Implements 10 instructions.
//!
//! See <https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions#arithmetic-and-math-instructions>

// 10 instructions

use super::{super::math, Engine, HintErrorKind, OpResult};

impl<'a> Engine<'a> {
Expand Down
Loading
Loading