Skip to content

fontlabapp.proof.text_holder.model · declarations 001

Back to fontlabapp.proof.text_holder.model

KEY module-attribute

KEY

client_sizes

client_sizes(extra: tuple[int, int], saved_frame: tuple[int, int] | None) -> tuple

Retain initial content500×400 but original NS frame min/max constraints.

find_first

find_first(text: str, needle: str) -> tuple[int, int] | None

Find from document start, preserving literal case and normalization.

index_at

index_at(text: str, position: int) -> int

Translate a Qt cursor boundary; refuse half of a surrogate pair.

plan_replacement

plan_replacement(text: str, needle: str, replacement: str, start: int, end: int) -> Replacement | None

Replace all literal matches inside selection, or whole text if collapsed.

show

show(*, path: Path | None = None, qt: Any = None) -> Any

Open the owned floating editor; tests inject an explicit temporary path.

utf16_units

utf16_units(text: str) -> int

Count QString/QTextCursor code units, including non-BMP characters.

window_origin

window_origin(left: int, top: int, screen_height: int, frame_height: int) -> tuple[int, int]

Map original Cocoa frame origin (0,500) to primary Qt logical coordinates.

Use the complete screen and decorated frame, not available area, content height or physical pixels. Negative positions are valid original results.