You are not logged in.

#1 2017-05-20 09:40:49

archtom
Member
Registered: 2011-05-04
Posts: 58

freetype2 2.8 line spacing issue

Hey,

the freetype2 2.8 update from yesterday brings bigger spaces between the lines when using the same font, same size and same config than before. It is system wide for me and I don`t care that much in terminal or a text editor, but my conky is messed up pretty much, too.

Is it a feature and I have to adjust all line spaces in conky or is it a bug?

If it is a bug, is there a workaround?

Downgrading to freetype2 2.7.1-2 fixes the issue.

Thanks for any help.

Offline

#2 2017-05-20 11:23:20

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: freetype2 2.8 line spacing issue

It seems it's not a bug, instead supposed to be a fix. If you look up the release notes for freetype2 2.8, they mention they have a configuration option that you can change when compiling it yourself to get the old behavior back, but they think that old behavior is wrong.

I could get the old look back for the programs I use here by doing tiny size changes to the font settings, for example size 10 changed into size 9.5, or a size 12 changed to 11.5.

EDIT: I mean this part of the release notes:

  II. IMPORTANT BUG FIXES

    - `Light' auto-hinting  mode no  longer uses TrueType  metrics for
      TrueType  fonts.   This bug  was  introduced  in version  2.4.6,
      causing   horizontal  scaling   also.    Almost  all   GNU/Linux
      distributions (with Fedora as  a notable exception) disabled the
      corresponding patch for good reasons; chances are thus high that
      you won't notice a difference.

      If  optical backward  compatibility for  legacy applications  is
      necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS
      configuration option.   However, it  is strongly  recommended to
      avoid that, adjusting font sizes instead.

Last edited by Ropid (2017-05-20 11:26:32)

Offline

#3 2017-05-20 12:43:25

vej.kse
Member
Registered: 2014-06-23
Posts: 5

Re: freetype2 2.8 line spacing issue

I don’t think it’s that: I observe the same change but I use “hintfull”, not “hintslight”.  Moreover, I observe no difference horizontally, only vertically (and only between lines, the characters themselves have the same height).

Offline

#4 2017-05-20 12:57:12

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: freetype2 2.8 line spacing issue

vej.kse wrote:

I don’t think it’s that: I observe the same change but I use “hintfull”, not “hintslight”.  Moreover, I observe no difference horizontally, only vertically (and only between lines, the characters themselves have the same height).

It could still be interesting to experiment with the option. They might have not described it well in their release notes. I found this guy here who tried it, but he doesn't mention vertical changes:

https://www.reddit.com/r/archlinux/comm … 8/dhs7psy/

Offline

#5 2017-05-20 13:32:27

luceph
Member
From: Ontario, Canada
Registered: 2017-05-06
Posts: 27

Re: freetype2 2.8 line spacing issue

Have you tried adding:

Xft.letterSpace: -1

to ~/.Xresources? (then loading it with xrdb ~/.Xresources)

Offline

#6 2017-05-20 13:39:55

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: freetype2 2.8 line spacing issue

luceph wrote:

Have you tried adding:

Xft.letterSpace: -1

to ~/.Xresources? (then loading it with xrdb ~/.Xresources)

I think his letter spacing is fine -- it's the line spacing that is the problem. In addition, I don't think changing Xresources will have any effect on conky.

Last edited by 2ManyDogs (2017-05-20 13:40:09)

Offline

#7 2017-05-20 13:58:18

luceph
Member
From: Ontario, Canada
Registered: 2017-05-06
Posts: 27

Re: freetype2 2.8 line spacing issue

Ah, pardon, I read that wrong.

Personally, I'd just take the time to edit the conky, if this is the new norm. As there's no conf file to edit, I personally see no alternative than editting the source code, which could take just as long and would have to be done every time the package is upgraded. I think only an admin would know the actual answer to this, though.

Offline

#8 2017-05-20 14:25:29

archimboldo
Member
Registered: 2016-03-07
Posts: 232

Re: freetype2 2.8 line spacing issue

For me this is a definitely a FIX ...an improvement.


Rules for problems.
Everyone has problems. Animals have problems. And buildings. And cats, and trees.
Problems are your friends. Treat them well.

Offline

#9 2017-05-20 15:02:04

mis
Member
Registered: 2016-03-16
Posts: 234

Re: freetype2 2.8 line spacing issue

Ropid wrote:

It seems it's not a bug, instead supposed to be a fix.
...
EDIT: I mean this part of the release notes:
...

Thank you for the info Ropid. That's what I was looking for. On my setup it looks better with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled.

Offline

#10 2017-05-21 09:26:09

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: freetype2 2.8 line spacing issue

Thanks for all the help.

Yes, I was actually referring only to the line spacing as the characters itself seem to be the same size.

I think the terminal and and other tools look worse with the new option, too. Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled. That would be the easiest and nicest way.

Thanks a lot.

Last edited by archtom (2017-05-21 09:27:21)

Offline

#11 2017-05-21 13:49:45

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: freetype2 2.8 line spacing issue

archtom wrote:

Thanks for all the help.

Yes, I was actually referring only to the line spacing as the characters itself seem to be the same size.

I think the terminal and and other tools look worse with the new option, too. Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled. That would be the easiest and nicest way.

Thanks a lot.

Did you try changing font sizes? You can use numbers like 9.5, 9.7, etc. (doesn't work with xterm). For the fonts I use here, it can still produce the same look as previously after some experimenting with fractional sizes. The character shapes and line heights seem to increase at different sizes when going through the stuff in 0.1 steps.

Offline

#12 2017-05-21 15:28:25

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

archtom wrote:

Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled.

Done, as I need this too! https://aur.archlinux.org/packages/freetype2-ttmetrics/

Offline

#13 2017-05-21 20:54:07

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: freetype2 2.8 line spacing issue

Chazza wrote:
archtom wrote:

Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled.

Done, as I need this too! https://aur.archlinux.org/packages/freetype2-ttmetrics/

Thanks a lot for your effort and the package.

Unfortunately it does not solve the original issue with the line spacing. Terminal, Pluma, Conky, etc. all still have the new, bigger line spacing.

Is there another option to turn on or is it a bug indeed?

Thanks for any further help.

Offline

#14 2017-05-21 20:56:15

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: freetype2 2.8 line spacing issue

Ropid wrote:
archtom wrote:

Thanks for all the help.

Yes, I was actually referring only to the line spacing as the characters itself seem to be the same size.

I think the terminal and and other tools look worse with the new option, too. Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled. That would be the easiest and nicest way.

Thanks a lot.

Did you try changing font sizes? You can use numbers like 9.5, 9.7, etc. (doesn't work with xterm). For the fonts I use here, it can still produce the same look as previously after some experimenting with fractional sizes. The character shapes and line heights seem to increase at different sizes when going through the stuff in 0.1 steps.

No, I did not try that as it affects so the whole system and I don`t want to try around with font sizes in every application. But thanks for the suggestion.

Offline

#15 2017-05-21 21:10:46

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

archtom wrote:
Chazza wrote:
archtom wrote:

Perhaps anyone can make an AUR package with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled.

Done, as I need this too! https://aur.archlinux.org/packages/freetype2-ttmetrics/

Thanks a lot for your effort and the package.

Unfortunately it does not solve the original issue with the line spacing. Terminal, Pluma, Conky, etc. all still have the new, bigger line spacing.

Is there another option to turn on or is it a bug indeed?

Thanks for any further help.

Yes, I saw that as well. It does correct the insane levels of hinting for the text in MATE Panel though. I'll try and see what else changed in freetype.

Offline

#16 2017-05-22 20:05:40

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

So far, I've found that a combination of freetype2 with AF_CONFIG_OPTION_TT_SIZE_METRICS enabled, plus changing the MATE dpi to 91.5 93 * seems to bring everything back to normal.

MATE dpi can be changed in dconf-editor -> /org/mate/desktop/font-rendering/dpi

*  91.5 brings the spacing for most fonts back to exactly how it was before other than in LibreOffice where it makes the fonts far too small. I found 93 to be a better compromise.

Last edited by Chazza (2017-06-11 11:08:01)

Offline

#17 2017-05-26 13:11:16

archtom
Member
Registered: 2011-05-04
Posts: 58

Re: freetype2 2.8 line spacing issue

Thanks for all the efforts so far, but the problem persists in the complete openbox desktop inkl. all gui apps. Does anyone else have a solution or workaround yet?

Offline

#18 2017-05-26 16:22:05

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

If lowering the dpi in MATE works for you then perhaps you might want to consider using something like xrandr to set lower the dpi in your Openbox session (the MATE setting will work only when mate-settings-daemon is running). See https://wiki.archlinux.org/index.php/Xo … I_manually

I'm afraid I still don't know what's actually changed in freetype to make this necessary. I tried reverting a few likely looking commits but no dice. Unfortunately I haven't really got time to investigate this further but if anybody gets to the bottom of what's happened with font spacing then I'd be interested to hear about it.

Offline

#19 2017-06-11 14:23:12

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

Well this was really annoying me so I finally figured it out. The line spacing issue was caused by this commit: http://git.savannah.gnu.org/cgit/freety … a7e30f9908

I've created a patch which reverses the change and I've added it to my freetype2-ttmetrics package. So if you install that, then everything should be back to how it was before - no need to adjust any fonts or DPI settings. smile

Last edited by Chazza (2017-06-11 16:59:29)

Offline

#20 2017-06-25 14:16:08

popi
Member
Registered: 2017-06-25
Posts: 4

Re: freetype2 2.8 line spacing issue

Thanks @Chazza, I don't know if it will be fixed/ rollback or stay like that for some time (considering this is a "fix"), but at the moment your package enabled my work on conky to be usable on Arch without having to rewrite a completely new different version for it (though it still needed very small adjustments).

Offline

#21 2017-08-30 12:52:56

vej.kse
Member
Registered: 2014-06-23
Posts: 5

Re: freetype2 2.8 line spacing issue

In my case, Chazza’s patch changes nothing.  I’ve tracked down the change to another commit: http://git.savannah.gnu.org/cgit/freety … 09f2acf244 , which was discussed in this bug report: https://savannah.nongnu.org/bugs/index.php?51445 , where patches are given.  Apparently, it’s not a bug, but an intentional change.  If I understand correctly it may be possible to adjust the interline spacing when compiling the library using FT_MulFix, but I haven’t had the time to try it yet.

Offline

#22 2017-08-30 13:19:45

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: freetype2 2.8 line spacing issue

Thanks for the link to the bug report. I think the second patch in that bug report is the same as the patch in my package; the only difference is that my one reverts a little more. I know nothing about freetype so when I found the commit that caused the problem for me I just reverted it in its entirety.

I don't know about others but I also need AF_CONFIG_OPTION_TT_SIZE_METRICS enabled otherwise the font hinting becomes absolutely horrible. I think this issue is separate from the line spacing issue but it's another freetype 2.8 related regression.

Last edited by Chazza (2017-08-30 13:25:28)

Offline

Board footer

Powered by FluxBB