Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

(predicted) Harfbuzz font hinting issues: Pango 1.44+ regression #6

Open
wyatt8740 opened this issue Jun 4, 2021 · 2 comments
Open

Comments

@wyatt8740
Copy link

wyatt8740 commented Jun 4, 2021

Hi,

While obviously this hasn't been tested on account of not running yet, am I correct in stating that STLWRT is going to link to upstream Pango and use it for text rendering?

Pango 1.44 and up use Harfbuzz for hinting, and Harfbuzz doesn't support "full" or "strong" hinting, breaking kerning on some very common fonts like Tahoma in certain configurations.

This is especially noticeable with antialiasing turned off. It's certainly highly noticeable in my name.
kern

It is even noticeable in this tiny little GTK3 program I made a while ago. Check out the spacing of the letters 'c' and 'e' in 'cancel,' and also the capital 'C' at the beginning. The 'p' in 'gimp' is also messed up slightly.
Screenshot of the run dialogue window (GTK+3 version)

For comparison, I rewrote it recently in FLTK 1.3 to get faster startup times, and ended up with a simpler program to write and better kerning to boot:
Screenshot of the run dialogue window (FLTK 1.3 version)

Anyway, I guess my question here is if there's anything that can be done on the toolkit side of Cairo to coerce text into better kerning/hinting, or if there's any other solution planned. This was all caused, apparently, when Cairo (edit: Pango) switched from FreeType to Harfbuzz for hinting (I am not familiar enough with Harfbuzz or GNOME to understand their reasoning for the move away from FreeType).

I suspect something can be, because I notice that Seamonkey (and Firefox) don't appear to have the issue despite also using GTK3 (except in the file chooser). But that could just be by avoiding Pango altogether, for all I know. After all, this is XUL stuff.

@dbtx
Copy link

dbtx commented Jun 4, 2021

We found out about [1] semi-recently in Gentoo because updates were allowed to filter down and (PCF) bitmap fonts disappeared. I had half a mind to mention it over on #4 but I don't really have anything to add like a solution besides 'idly wonder how hard it is to add things to Harfbuzz'.

edit2: I had a look at your IBM3161-font notes and IINM the main reason pango is still working for you at all is you have the OpenType bitmaps installed. I tried semi-automatically converting xos4 Terminus PCFs to OTB using the script from [2] so I could keep using that in xfce4-terminal... but I was disappointed. I gave up, anyway.

[1] https://blogs.gnome.org/mclasen/2019/05/25/pango-future-directions/
[2] https://fedoraproject.org/wiki/BitmapFontConversion

@thesquash
Copy link
Owner

Yes, STLWRT does use Pango.

I'm not sure why you use Microsoft fonts like Tahoma. I guess maybe you like the look of the font? Either way, sorry but I have other problems with this project to deal with. I'll worry about Pango when things are settled down.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants