Skip to content

proposal: x/image/font: add sTypoAscent and sTypoDescent #68394

@zhuowenchen

Description

@zhuowenchen

Proposal Details

Now we will parse the ascender and descender in the hhea table of the font file, but this is not enough. According to the protocol description, the ascender and descender in the hhea table are applied to the apple platform, while the applications developed based on the windows platform require the ascender and descender to parse the sTypoAscender and sTypoDescender in the os2 table. (https://learn.microsoft.com/en-us/typography/opentype/spec/hhea)
image
However, our library does not provide such support. Can the sTypoAscender and sTypoDescender in the os2 table be added to the parse in the sfnt/sfnt.go file of golang.org/x/image/font/sfnt/?
The structure of the os2 table is described in this document, which contains the required sTypoAscender and sTypoDescender.(https://learn.microsoft.com/da-dk/typography/opentype/spec/os2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions