Skip to content

Faking of bold/italic character sets is not complete #2689

Description

@rmkaplan

This is a problem that appeared when poking around with the NSDISPLAYSIZE enlargements (PR #2687 ), but it is a separate and unrelated issue concerning the logic of font character and charset coercion

The goal of these coercions is to have every font as MCC-complete as it can be, by filling in missing glyphs from other fonts with the best roughly similar appearances. So, Timesroman is filled in from Classic, Gacha is filled in from Terminal, which is filled in from Modern, which is filled in from Classic. Of note, Hippo (after its Greek characters have been moved to their MCCS position in charset 46) also inherits from Classic. Classic is specified as the bottom of the inheritance sequence, since it tends to be the most complete.

Part of the completion logic is also to apply the faking algorithms for bolding and italicizing when no better sources are available.

The problem shows up when you compare (e.g. EDITFONT) the Greek character sets of Classic 12 Bold and Hippo 12 Bold. Classic 12 Bold-Greek is empty, Hippo 12 Bold-Greek has the expected glyphs. So you would expect that Classic 12 Bold (and Gacha, Terminal...everything else that coerces down to it) would inherit the bolded Hippo glyphs--those are the best (only?) glyphs available. (This is not an issue for source-font Classic 10, which happens to have its own Greek glyphs which are then faked to bold in the intended way.)

There appears to be a circularity or perhaps an ordering paradox in the achieving the desired outcome: Hippo inherits all of its non-Greek stuff from Classic, and Hippo then gets bolded. If Classic Bold doesn't have Greek, it should then inherit Greek from the boldified Hippo glyphs (and maybe Cyrillic from Cyrillic etc.).

The current completion logic doesn't support this. If Hippo coerces from Classic and then Classic coerces from Hippo, you get a stack overflow. It may be that the recursion can be stopped (with the intended result) if an extra charset parameter (Greek) is specified for the second coercion--only recurse if that particular character set is empty and the source one exists. Or perhaps complicate the logic so that it records the font/charset combinations it has already visited and avoids repetition.

And, having gotten Classic 12 Bold right, does it also have to cycle to all of the other fonts that thought they got everything thing they needed from Classic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions