Skip to content

fontlint: bug: incorrect warnings for double-width fixed pitch truetype fonts #5198

@jayaddison

Description

@jayaddison

When reporting a bug/issue:

  • Screenshot
The advance width of space (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of exclam (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of quotedbl (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of numbersign (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of dollar (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of percent (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of ampersand (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of quotesingle (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of parenleft (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font
The advance width of parenright (500) does not match the font's advanceWidthMax (1000) and this is a fixed pitch font

(and then another twenty-five thousand lines, approximately, of similar warnings)

  • The FontForge version and the operating system you're using
 Version: 20230101
 Based on sources from 2023-01-18 18:05 UTC-ML-D-GDK3.

Debian bookworm.

  • The behavior you expect to see, and the actual behavior

These warnings that appear aren't expected - the font is a double-width fixed pitch font, so a glyph width of 500 is acceptable for the advance width limit of 1000.

  • Steps to reproduce the behavior
fontlint iosevka-thin.ttf

(iosevka v18.0.0)

  • (optional) Possible solution/fix/workaround

If it's possible to identify double (or other multiple) width fonts, then perhaps the logic here could be adjusted to use that information during lint checks: https://github.com/fontforge/fontforge/blob/20230101/fontforge/parsettf.c#L6304-L6306

Thank you!

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