Skip to content

fontscan: how to combine ResolveFace and ResolveFaceForLang? #139

@dominikh

Description

@dominikh

ResolveFace returns the first face that covers a given rune, while ResolveFaceForLang returns the first face that covers a given language. But how do I find the first face that covers a given rune in a given language?

For example, we might have two fonts cn0-4 and cn4-8 that cover disjoint sets of runes for Traditional Chinese, and two fonts jp0-4 and jp4-8 that cover the same runes as the Chinese fonts, but for Japanese, registered in the order cn0-4, cn4-8, jp0-4, jp4-8.

I cannot just look for "rune 5", nor for "japanese" to find jp4-8. The first search would find cn4-8, and the second search would find jp0-4.

This also impacts shaping.SplitByFace, which currently discards language information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions