Skip to content

fontlabapp.metrics.canvas_rsb.model · declarations 001

Back to fontlabapp.metrics.canvas_rsb.model

Matrix module-attribute

Matrix

capture

capture(canvas: Any, package: Any, direction: int, *, deadline: float | None = None) -> tuple[Marker, ...]

Read every bound-font glyph occurrence without selection or font writes.

Poll outside paint. Bound native list conversion with GC off. Refuse an incomplete scan, changed master domain or missing layer as a whole.

compose

compose(first: Matrix, second: Matrix) -> Matrix

Apply first then second, matching native glyph × block × viewport.

Callers test the result for finiteness and singularity themselves, so the shared concat runs unchecked here.

geometry

geometry(width: float, ascender: float, descender: float, x_height: float, angle: float, scale: float, direction: int) -> tuple[tuple[Point, Point], tuple[Point, Point, Point], float]

Keep original italic shift, half-advance triangle and scale exponents.

Direction0 marks the right advance edge; direction2 marks the left edge. Zero/negative advances are meaningful. Singular/non-finite inputs refuse.

map_point

map_point(matrix: Matrix, point: Point) -> Point

Map one point through a numeric Qt affine matrix.

matrix

matrix(transform: Any) -> Matrix

Copy only the verified six affine terms; retain no native wrapper.

paint

paint(painter: Any, records: tuple[Marker, ...], color: str) -> None

Paint original line and red40% triangle; always restore the borrowed painter.