Skip to content

fontlab_glyport._source_map

_source_map

Compose conservative character-span provenance across ordered edits.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
compose function (before: str, after: str, origins: list[tuple[int, int]]) -> list[tuple[int, int]] Unchanged characters retain identity; replacements inherit the edited span.
position function (text: str, offset: int) -> list[int] Return one-based Unicode character coordinates, with exclusive span ends.
serialize function (original: str, generated: str, origins: list[tuple[int, int]]) -> dict Export exhaustive generated character spans mapped to original spans.