| Summary: | Full hinting broken by subpixel positioning | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Pierre Ossman <ossman> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | bugs-noreply, cgarcia, mcatanzaro, mmaxfield, vitaly, webkit-bug-importer |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugzilla.redhat.com/show_bug.cgi?id=1999078 | ||
|
Description
Pierre Ossman
2023-08-15 03:43:52 PDT
I'm pretty sure WebKit does not do subpixel positioning at all? I thought it only does hinting. So I doubt any of those issues are relevant. That was the diagnosis in the Red Hat bug linked above, given the various tests with pango and cairo. Especially the last test, where a special build of cairo without subpixel positioning got rid of the issue. Could it be that subpixel positioning is the new default in cairo, and WebKit needs to do something explicit to turn it off? That merge request for GTK shows some extra cairo calls. Could those be relevant for WebKit? (In reply to Pierre Ossman from comment #2) > Could it be that subpixel positioning is the new default in cairo, and > WebKit needs to do something explicit to turn it off? Maybe and maybe. > That merge request for GTK shows some extra cairo calls. Could those be > relevant for WebKit? Maybe. Truth is, nobody here understands font rendering except Carlos Garcia, and he is telling me "I don't know." I will try asking around, but we probably won't change anything unless a font expert decides to get involved and tell us specifically what to do. What I do know is that subpixel positioning is incompatible with hinting, so you need to do only one or the other in a particular direction (horizontal or vertical). By default, FreeType does vertical hinting only and does not perform horizontal hinting, so horizontal subpixel positioning should be OK, but we need to make sure not to do any vertical subpixel positioning. It sounds like there are not currently any problems with that. But when you configure "full" hinting (which is not recommended by the FreeType developers and font experts I have talked to) then hinting may be performed horizontally too, so then we need to make sure we are additionally not doing any horizontal subpixel positioning. Sounds like something is wrong there. (In reply to Pierre Ossman from comment #0) > Right now, they seem to have landed in disabling sub-pixel positioning for > standard DPI displays: > > https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6190 > > Hopefully, something similar can be done in WebKit? What that merge request does is forcibly enable "hint metrics" when the display scale factor is 1, and forcibly disables "hint metrics" at all other scale factors. Presumably that indirectly disables/enables subpixel positioning as well? I don't know. There is no subpixel positioning setting. I also don't know what "hint metrics" are or how this setting interacts with the separate "hint style" setting. |