Skip to content

fontlabapp.masters.angles.model · declarations 001

Back to fontlabapp.masters.angles.model

DEFAULT_BLUE_SCALE module-attribute

DEFAULT_BLUE_SCALE

HISTORY_COMPACT_LIMIT module-attribute

HISTORY_COMPACT_LIMIT

HISTORY_HINT_DIGITS module-attribute

HISTORY_HINT_DIGITS

MAX_ANGLE

MAX_ANGLE

MIN_ANGLE

MIN_ANGLE

NATIVE_INT_LIMIT module-attribute

NATIVE_INT_LIMIT

apply

apply(snapshot: AngleSnapshot, proposed: dict[str, float], *, undo_name: str = 'Italic Angle') -> list[str]

Apply finite in-range angles in font order, returning only changed masters.

Empty and unchanged batches create no history. A switched or changed font refuses before history. Package/glyph/auto layers are never included in the notification.

capture

capture(package: Any) -> AngleSnapshot

Read every ordered master angle and restore the original master on failure.

history_preserves_blue_scale

history_preserves_blue_scale(value: float, inherited: float = DEFAULT_BLUE_SCALE) -> bool

Refuse the measured native decimal/binary32 hinting loss (FontLab #8531).

This models the current host's numeric history round trip without touching font data or history. Compare at its saved eight-decimal hint precision; do not repair hinting values before, after, or during Undo. Extreme values fail closed before the native encoder's signed-integer conversion can overflow.

write_angles

write_angles(package: Any, angles: dict[str, float]) -> list[str]

Preserve the original direct helper while repeating the complete source guard.