The FreeType Project - Bugs: bug #54555, All 3 TrueType engines calculate...
You are not allowed to post comments on this tracker with your current authentication level.
bug #54555: All 3 TrueType engines calculate glyph widths incorrectly
Submitter: | Georgi Boiko <pandasauce> | ||
Submitted: | Wed 22 Aug 2018 09:01:37 PM UTC | ||
Severity: | 3 - Normal | Item Group: | Incorrect behaviour |
Status: | Invalid | Privacy: | Public |
Assigned to: | wl | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Sun 24 Feb 2019 05:59:34 PM UTC, comment #16: |
Werner LEMBERG <wl>![]() ![]() |
Sun 24 Feb 2019 05:00:40 PM UTC, comment #15: The culprit has been identified as missing/disabled subpixel positioning, which the text layouting code has to implement, so I guess we can close this issue? Same problem in cairo and therefore all GTK applications. Qt implements it, with pleasing results. |
Nikolaus Waxweiler <morksig>![]() |
Thu 21 Feb 2019 09:42:37 PM UTC, comment #14: Finally had the opportunity to play around with Chrome and figure this out. They disable subpixel positioning by default for seemingly no reason. Building a patched version of Chromium with it enabled fixes the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=824153#c7
|
Georgi Boiko <pandasauce> |
Fri 24 Aug 2018 09:23:57 PM UTC, comment #13: I just want to thank you for your patience and bearing with me. It appears that I came across issues similar to those described in Behdad Esfahbod's whitepaper https://docs.google.com/document/d/1wpzgGMqXgit6FBVaO76epnnFC_rQPdVKswrDQWyqO1M/edit
|
Georgi Boiko <pandasauce> |
Fri 24 Aug 2018 07:56:32 PM UTC, comment #12: How many whole pixels would you like to remove in ftdiff/ftstring rendering? At what whole ppem value?
|
Alexei Podtelezhnikov <podtelez>![]() |
Fri 24 Aug 2018 07:29:03 PM UTC, comment #11: Are you sure this is a Chrome issue? The screenshot where I remove 1px is from ftdiff. If every application has to implement it, does it not belong somewhere on the rendering stack instead, e.g. cairo or FreeType?
|
Georgi Boiko <pandasauce> |
Fri 24 Aug 2018 06:48:04 PM UTC, comment #10: You do agree that removing the whole pixel between "Aud" and "iting" is too much, don't you? You what to remove like half a pixel. Right? This is called subpixel positioning. I thought that Chrome actually implements it, but I do not know how to enable it.
|
Alexei Podtelezhnikov <podtelez>![]() |
Fri 24 Aug 2018 06:32:09 PM UTC, comment #9: One more observation: in v40, "d" in "Auditing" is padded with vertical 1px whitespace both on the left and on the right, whereas on the autohinter there is no vertical whitespace on either side of it. See 72-zoomed-in-whitespace-1px.png - I pointed out the colour measurements there. |
Georgi Boiko <pandasauce> |
Fri 24 Aug 2018 06:26:37 PM UTC, comment #8: Not all Infinality patches were integrated: https://github.com/archfan/infinality_bundle/blob/master/01_freetype2-iu/0001-infinality-2.9.1-2018.06.21.patch
|
Georgi Boiko <pandasauce> |
Fri 24 Aug 2018 02:04:37 PM UTC, comment #7: What do you mean Infinality patches???? v38 is integrated Infinality. We actually default to v40. Please tell me that you do not have any custom patches.
|
Alexei Podtelezhnikov <podtelez>![]() |
Thu 23 Aug 2018 09:23:31 PM UTC, comment #6: My original screenshots have red boxes to point out the precise letter pairs that are broken.
|
Georgi Boiko <pandasauce> |
Thu 23 Aug 2018 08:27:26 PM UTC, comment #5: Can you try to describe the issue more precisely? Does you feel like removing or adding a pixel between letters? Specifically where?
|
Alexei Podtelezhnikov <podtelez>![]() |
Thu 23 Aug 2018 05:02:32 PM UTC, comment #4: On that page, font-size is set to 16px for the main copy and 14px for the left-hand menu.
|
Georgi Boiko <pandasauce> |
Thu 23 Aug 2018 04:04:42 PM UTC, comment #3: I agree with Werner. This is the issue with Chrome or whatever they use for layout. I suspect that they use linearHoriAdvance so that text is WYSIWYG on paper, or something. The bottom line is that hinted WYSIWYG layout is complicated and requires dumping accumulating rounding residues onto the whitespace between words.
|
Alexei Podtelezhnikov <podtelez>![]() |
Thu 23 Aug 2018 07:50:22 AM UTC, comment #2: First of all: For hinted TrueType fonts, the ppem value is always an integer. In your large image, the main font size is 16ppem.
|
Werner LEMBERG <wl>![]() ![]() |
Wed 22 Aug 2018 09:12:54 PM UTC, comment #1: Apologies, I mixed up ppems and pts of ftview settings in my original comment. 14pt at 96dpi (18.67ppem) and 19ppem at 72dpi are the correct values. |
Georgi Boiko <pandasauce> |
Wed 22 Aug 2018 09:01:37 PM UTC, original submission:
As per the attached image, v35, v38 and v40 all result in broken glyph widths. The issue is not present in the autohinter or with hinting disabled, but both have even worse results (bold and blurry fonts respectively).
|
Georgi Boiko <pandasauce> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 18 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-02-24 | wl | Status | None | ![]() |
Invalid |
Assigned to | None | ![]() |
wl | ||
Open/Closed | Open | ![]() |
Closed | ||
2018-08-24 | pandasauce | Attached File | - | ![]() |
Added 72-arial-20pt20ppem.png, #44853 |
Attached File | - | ![]() |
Added 72-liberation-19pt19ppem.png, #44854 | ||
Attached File | - | ![]() |
Added 72-liberation-browser.png, #44855 | ||
Attached File | - | ![]() |
Added 72-zoomed-in-whitespace-1px.png, #44856 | ||
2018-08-24 | pandasauce | Attached File | - | ![]() |
Added 72-widths-bci.png, #44849 |
Attached File | - | ![]() |
Added 72-arial-14pt14ppem.png, #44850 | ||
Attached File | - | ![]() |
Added 72-arial-18_5pt19ppem.png, #44851 | ||
Attached File | - | ![]() |
Added 72-arial-19pt19ppem.png, #44852 | ||
2018-08-23 | pandasauce | Attached File | - | ![]() |
Added zoomed-in-remove-1px.png, #44840 |
2018-08-23 | pandasauce | Attached File | - | ![]() |
Added liberation-browser.png, #44835 |
Attached File | - | ![]() |
Added liberation-14pt19ppem.png, #44836 | ||
Attached File | - | ![]() |
Added arial-14pt19ppem.png, #44837 | ||
Attached File | - | ![]() |
Added arial-13_5pt18ppem.png, #44838 | ||
2018-08-23 | wl | Attached File | - | ![]() |
Added arial-ftdiff.png, #44831 |
2018-08-22 | pandasauce | Attached File | - | ![]() |
Added widths-merged-boxes.png, #44828 |
Ok, closed.