Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cff: Fix version number #762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 11, 2024

  1. cff: Fix version number

    [why]
    The version number written out to a buffer is not the number stored in
    font.tables.cff.topDict.version. Instead some other human readable
    string is used even if the cff.topDict.version has been set correctly.
    
    The CFF version number needs to be a string representing a number and
    nothing else; especially it should not contain 'Version'.
    
    Documentation [1] says this:
        version 0 SID
        This can be derived by copying the OpenType 'head' fsRevision
        field, and formatting it as a Fixed with three decimal places of
        precision.
    
    The documentation is also valid for CFF1 in this regard.
    
    [how]
    Use the version string in the CFF table, if there is one.
    If not fall back to the (imho wrong) previous defaulting behavior.
    
    [1] https://learn.microsoft.com/en-us/typography/opentype/otspec180/cff2#sectionD3
    
    Signed-off-by: Fini Jastrow <[email protected]>
    Finii committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4079ef8 View commit details
    Browse the repository at this point in the history