bugThe FreeType Project - Bugs: bug #52124, lcdlegacy not working after...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #52124: lcdlegacy not working after upgrade to 2.8.1

Submitter:  Carlos <memeplex>
Submitted:  Wed 27 Sep 2017 05:01:38 PM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Works For Me Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Tue 03 Oct 2017 03:30:56 AM UTC, comment #23: 

Thanks for the new log file!  Is this for the older or newer version of FreeType?  And please post a second log file with the other version of FreeType so that I can compare the differences.

I also ask you to post a link to your report to the xft people (mailing list archive, bug tracker, whatever) so that it can be properly looked up.

Werner LEMBERG <wl>
Group administrator
Mon 02 Oct 2017 09:47:31 PM UTC, comment #22: 

Ok, guys, I'm reporting this to xft mailing list, then.

Nevertheless I attached the debug output of xft with level 63. Maybe you find out something interesting there.

It's a sad state of affairs, since xft is pervasive and harmony is freetype new default...

(file #42048)

Carlos <memeplex>
Mon 02 Oct 2017 08:52:28 PM UTC, comment #21: 

I agree with Alexei.

Regardless of that, you probably need

  XFT_DEBUG=63

to get details on the glyph metrics itself.  Interesting would be a log comparison between the two FreeType versions that give the different rendering results.

Werner LEMBERG <wl>
Group administrator
Mon 02 Oct 2017 08:26:56 PM UTC, comment #20: 

Carlos,

At this stage you should bring it up with Xft. Have you done so? It is not actively maintained though.

We cannot help you.

Good luck!
Alexei


Alexei Podtelezhnikov <podtelez>
Group Member
Mon 02 Oct 2017 07:34:36 PM UTC, comment #19: 

I've also attached a tiny screenshot showing the same text in the title of a window (i3 window manager/pango) and the window itself (urxvt/xft). The font configuration is the same: dejavu sans mono book 10, but it's obvious they render in very different ways.


Carlos <memeplex>
Mon 02 Oct 2017 07:30:49 PM UTC, comment #18: 

The output of dmenu (which also uses xft) looks pretty distorted too, with the same font and size configuration.

Carlos <memeplex>
Mon 02 Oct 2017 07:27:12 PM UTC, comment #17: 

Werner, I've attached the debug output of xft while launching urxvt.

Regarding other terminals, I've tested lxterminal (which uses vte, the same as gnome-terminal) and the size and spacing of the output is quite similar to the original lcdlegacy one, so this seems to be a xft or urxvt thing (according to the answer from the urxvt guys it should be more xft related).

Carlos <memeplex>
Mon 02 Oct 2017 04:54:56 AM UTC, comment #16: 

Alas, my knowledge is far too limited to help debugging this issue.  Maybe the problem is related to libXft – can you get more information by using the XFT_DEBUG environment variable?  Look into file libXft/src/xftint.h for the available constants.

Can you alternatively try KDE's or gnome's terminal app and check whether you get this issue also?  AFAIK, those desktops don't use Xft but interact with FreeType directly.

Werner LEMBERG <wl>
Group administrator
Sun 01 Oct 2017 11:36:53 AM UTC, comment #15: 

Answer from urxvt mailing list:


However, I can guarantee that urxvt does not change the way it is spacing
fonts depending on the freetype renderer - it simply uses whatever
freetype provides, so any changes in spacing due to freetype version
changes are entirely due to freetype changing things. In fact, urxvt
doesn't even know about freetype at all.

Note that most fonts used with freetype do not support terminals (which
needs a fixed-width font (charcell in xlfd lingo), which most monospaced
fonts are not), and spacing issues are expected when urxvt has to squeeze
such fonts into a regular grid, which might or might not be what you find
inadequate.

---

What do you think? According to the above there should be no spacing difference by just switching to harmony.

Carlos <memeplex>
Fri 29 Sep 2017 12:51:37 PM UTC, comment #14: 

Werner, your screenshot looks definitively much better than mine. I'm using the venerable urxvt, nothing fancy here. I'm raising this issue in their list. I'll keep you informed. Thanks.

Carlos <memeplex>
Fri 29 Sep 2017 06:00:05 AM UTC, comment #13: 

Have a look at the attached image (DejaVuSansMono v2.34, using FreeType's `ftdiff' demo program from current git).  I can't explain why you get such unusually large advance widths in the right part of your image.  Maybe the code in your terminal application uses another route, causing the difference?  I suggest you ask the app developers.



Werner LEMBERG <wl>
Group administrator
Thu 28 Sep 2017 09:37:53 PM UTC, comment #12: 

I've been playing with the sizes but, regardless of the font size, the spacing between characters is much larger with harmony, so at the same font size horizontal space quickly become scarce. For example, I use to split my notebook screen to fit two 80+ columns terminals, now I get around 70- columns for each terminal. I think I will go against the tide here, but nevertheless thank you for your explanations and suggestions.

I've attached a last screenshot to show it's not just delusion. The grey vertical bar in the first terminal is at column 80. The font in the second terminal is blurrier also, although I concede it's quite good and I could eventually get used to it.


Carlos <memeplex>
Thu 28 Sep 2017 09:21:54 PM UTC, comment #11: 

Werner, just one question about the sizes issue. Neither of the screenshots is for freetype < 2.7.1. The cleartype one is 2.8, the harmony one is 2.8.1, that's it. The size configuration is exactly the same, only the filtering and hinting changed. So am I expected to see this size mismatch between the two renderers? If I am, then which is the faulty renderer?

Carlos <memeplex>
Thu 28 Sep 2017 06:00:07 PM UTC, comment #10: 

You seem like than letters 'umn' squeezed together without any gaps. I hate that. You are just used to full hinting, I always hated it, I always liked well-shaped well-spaced glyphs.

I am with the majority of users. This is why Apple and Microsoft moved on from full hinting. They would never do that if most people preferred full hinting. They know their market.

The distros (and FreeType) are correct to move on from full hinting. We are really sorry that you and the minority of user do not get full hinting by default any longer. :)

[rant aside]

Do try smaller fractional sizes in your terminal if you really after shorter letters.

Alexei Podtelezhnikov <podtelez>
Group Member
Thu 28 Sep 2017 05:22:26 PM UTC, comment #9: 

That was my first impression too, but the size configuration is the same. I will explore your new suggestion, there is some hope after all.

Carlos <memeplex>
Thu 28 Sep 2017 05:19:17 PM UTC, comment #8: 

Well, those two screenshots use different font sizes!  There was a long-standing bug in FreeType < 2.7.1 that caused usage of incorrect metrics.  Please play around with fractional font sizes (e.g., 12.9pt instead of 13pt) for your terminal app.

Werner LEMBERG <wl>
Group administrator
Thu 28 Sep 2017 05:09:07 PM UTC, comment #7: 

Alexei, I really want to like your suggestion but see the attached screenshot. That is dejavu sans mono with harmony-slight-hinting (left side) vs cleartype-legacy-full-hinting (right side). I don't think this is my OCD talking.


Carlos <memeplex>
Thu 28 Sep 2017 03:56:01 PM UTC, comment #6: 

Lastly, indeed full hinting works with the legacy filter but does not really chime with anything else. I suggest that you try light hinting with the default FreeType build. This should give you the feel of macOS or Vista/8/10. See if you like it.

Alexei Podtelezhnikov <podtelez>
Group Member
Thu 28 Sep 2017 02:52:48 PM UTC, comment #5: 


> Therefore, there is no need to keep them both


I can't say I agree with this statement. lcdlegacy with full hinting provides fonts far crispier than any other configuration. I recognized the difference after 5 seconds of upgrading my system and at that point I wasn't even aware of the freetype upgrade. It's called legacy, but I'm yet to see its replacement. I do agree harmony output is not the blurry color-fringed font you get by ill configuring cleartype, but it's neither the crisp, sharp font I love to see in my terminals and browser. I like the idea of a new renderer with better configuration/outcome trade-off, but I don't like the lose of flexibility for power users it implies. I guess I'm gonna maintain a separate package of such a central library, which is never a happy task. Thank you for the harsh truth, though.

Carlos <memeplex>
Thu 28 Sep 2017 02:12:19 PM UTC, comment #4: 

ClearType with light filter is indistinguishable from Harmony. Therefore, there is no need to keep them both. If you want obsolete legacy filtering you have to enable ClearType. The comment at https://bbs.archlinux.org/viewtopic.php?pid=1738620 is correct.

Alexei Podtelezhnikov <podtelez>
Group Member
Thu 28 Sep 2017 06:29:42 AM UTC, comment #3: 

Thank you for the explanation.

Is it possible to enable filtering by using an environment variable instead of a compilation option? This new default will invalidate many existing configurations if distros ship it compiled by default.

Carlos <memeplex>
Thu 28 Sep 2017 04:41:53 AM UTC, comment #2: 

Oh, never mind! I know what happened. You build the default FreeType without FT_CONFIG_OPTION_SUBPIXEL_RENDERING, which now comes with LCD-optimized rendering, without any filtering whatsoever, without the legacy filter as well. This is just the way it works without any tuning.

If you insist on the legacy filter, you need FT_CONFIG_OPTION_SUBPIXEL_RENDERING indeed.

Alexei Podtelezhnikov <podtelez>
Group Member
Wed 27 Sep 2017 05:14:08 PM UTC, comment #1: 

Can you try FreeType git HEAD?

Can you provide screenshots if it is still broken.

Alexei Podtelezhnikov <podtelez>
Group Member
Wed 27 Sep 2017 05:01:38 PM UTC, original submission:  

Please see details in my post to the arch linux forums describing this problem: https://bbs.archlinux.org/viewtopic.php?pid=1738620.

I've reported this downstream also (https://bugs.archlinux.org/task/55771) but given the kind of changes that 2.8.1 introduced I guess it's probably an upstream bug.

Carlos <memeplex>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #42048:  urxvt_xft_debug.txt added by memeplex (10KiB - text/plain - urxvt debug output from xft level=63)
file #42046:  urxvt_xft_debug.txt added by memeplex (12KiB - text/plain - urxvt debug output from xft)
file #41960:  DejaVuSansMono.png added by wl (13KiB - image/png)
file #41954:  2017-09-28-183359_1362x327_scrot.png added by memeplex (70KiB - image/png - Horizontal spacing)
file #41948:  2017-09-28-140514_701x171_scrot.png added by memeplex (25KiB - image/png - harmony vs legacy)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by podtelez (Posted a comment)
  • -email is unavailable- added by memeplex (Submitted the item)
  •  

    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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-02 memeplex Attached File- Added urxvt_xft_debug.txt, #42048
    2017-10-02 memeplex Attached File- Added 2017-10-02-163203_245x51_scrot.png, #42047
    2017-10-02 memeplex Attached File- Added urxvt_xft_debug.txt, #42046
    2017-09-29 wl Attached File- Added DejaVuSansMono.png, #41960
    2017-09-28 memeplex Attached File- Added 2017-09-28-183359_1362x327_scrot.png, #41954
    2017-09-28 memeplex Attached File- Added 2017-09-28-140514_701x171_scrot.png, #41948
    2017-09-28 podtelez StatusNone Works For Me
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code