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

fix incorrect text width with newer (1.43?) Pango #2184

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Commits on Jan 2, 2023

  1. fix incorrect text width with newer (1.43?) Pango

    Text renders wider or narrower, as if letter-spacing is set, than
    it should with newer versions of Pango.
    
    My best understanding of this problem is that around version 1.43
    Pango dropped support for font hinting because it switched to
    Harbuzz for glyph postions instead of Freetype. For some reason it
    still rounds the glyph positions by default.
    
    There's no need for node-canvas to support font hinting. The
    maintainers of the Linux font stack (Behdad and Matthias) have
    stated that they wont, and font hinting is subjective, and
    browsers have moved to subpixel positioning too.
    
    Reading (warning: lots of drama to wade through):
    - https://gitlab.gnome.org/GNOME/pango/-/issues/404
    - https://gitlab.gnome.org/GNOME/pango/-/issues/463
    - harfbuzz/harfbuzz#1892
    - harfbuzz/harfbuzz#2394
    chearon committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    f783d74 View commit details
    Browse the repository at this point in the history