Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Freetype and DejaVu font woes after updates
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
JohnLM
n00b
n00b


Joined: 20 Apr 2009
Posts: 71
Location: LATVIA

PostPosted: Tue Jun 19, 2018 2:02 pm    Post subject: [SOLVED] Freetype and DejaVu font woes after updates Reply with quote

Hi guys,
I've recently done profile upgrade to 17.0 and done tree rebuild which along other packages also updated:

  • media-libs/freetype-2.6.3-r1 to media-libs/freetype-2.9.1-r3
  • media-fonts/dejavu-2.35 to media-fonts/dejavu-2.37


This has made my DejaVu Mono look weird on terminal and elsewhere.
Screenshots: Before After (please download the pics if your browser shows them scaled)

In screenshots you can see the fonts have become more blurry, particularly bad hinting on '+', 'n' and 'm' characters. They also seem to become taller (less lines fit in the terminal window). I wouldn't care much about them being taller though if they still looked fine.

Even though none of the configuration options had been changed, I still double-checked the usual suspects:

  • checked all hinting options (off/slight/medium/full);
  • checked autohinter (on/off);
  • tried flipping FREETYPE_PROPERTIES=truetype:interpreter-version=N (unset/35/38/40);
  • tried flipping other FREETYPE_PROPERTIES too;
  • downgraded media-fonts/dejavu back to 2.35;
  • tried multiple permutations of the above.


My current fontconfig:
Code:
$ eselect fontconfig list
Available fontconfig .conf files (* is enabled):
  [1]   09-texlive.conf
  [2]   10-autohint.conf
  [3]   10-hinting-full.conf
  [4]   10-hinting-medium.conf
  [5]   10-hinting-none.conf
  [6]   10-hinting-slight.conf *
  [7]   10-no-sub-pixel.conf
  [8]   10-scale-bitmap-fonts.conf *
  [9]   10-sub-pixel-bgr.conf
  [10]  10-sub-pixel-rgb.conf
  [11]  10-sub-pixel-vbgr.conf
  [12]  10-sub-pixel-vrgb.conf
  [13]  10-unhinted.conf
  [14]  11-lcdfilter-default.conf
  [15]  11-lcdfilter-legacy.conf
  [16]  11-lcdfilter-light.conf
  [17]  20-unhint-small-dejavu-sans-mono.conf *
  [18]  20-unhint-small-dejavu-sans.conf
  [19]  20-unhint-small-dejavu-serif.conf
  [20]  20-unhint-small-vera.conf *
  [21]  25-ttf-arphic-ukai-render.conf
  [22]  25-ttf-arphic-uming-bitmaps.conf
  [23]  25-ttf-arphic-uming-render.conf
  [24]  25-unhint-nonlatin.conf
  [25]  30-metric-aliases.conf *
  [26]  35-ttf-arphic-ukai-aliases.conf
  [27]  35-ttf-arphic-uming-aliases.conf
  [28]  40-nonlatin.conf *
  [29]  41-ttf-arphic-ukai.conf
  [30]  41-ttf-arphic-uming.conf
  [31]  45-generic.conf *
  [32]  45-latin.conf *
  [33]  49-sansserif.conf *
  [34]  50-user.conf *
  [35]  51-local.conf *
  [36]  57-dejavu-sans-mono.conf *
  [37]  57-dejavu-sans.conf
  [38]  57-dejavu-serif.conf
  [39]  60-generic.conf *
  [40]  60-latin.conf *
  [41]  60-liberation.conf
  [42]  64-ttf-arphic-uming.conf
  [43]  65-fonts-persian.conf *
  [44]  65-khmer.conf
  [45]  65-nonlatin.conf *
  [46]  66-ja-ipafonts.conf
  [47]  69-unifont.conf *
  [48]  70-no-bitmaps.conf
  [49]  70-yes-bitmaps.conf
  [50]  75-ttf-arphic-ukai-select.conf
  [51]  75-yes-terminus.conf
  [52]  80-delicious.conf *
  [53]  90-synthetic.conf *
  [54]  90-ttf-arphic-ukai-embolden.conf
  [55]  90-ttf-arphic-uming-embolden.conf


I've ran out of options, I want my old, crisp font look back. Preferably without pinning freetype to an old version though. :(
_________________
"I reject your reality and substitute my own" - A. Savage


Last edited by JohnLM on Tue Jun 19, 2018 6:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jun 19, 2018 2:21 pm    Post subject: Reply with quote

JohnLM ...

try setting 10-sub-pixel-rgb.conf (or 'Xft.rgba: rgb' in ~/.Xresources).

best ... khay
Back to top
View user's profile Send private message
JohnLM
n00b
n00b


Joined: 20 Apr 2009
Posts: 71
Location: LATVIA

PostPosted: Tue Jun 19, 2018 6:50 pm    Post subject: Reply with quote

Thanks khayyam! I tried, but the RGB subpixel hinting is not what I'm after.

But I managed to solve it. What I was after, was using the old freetype hinting engine that hints both horizontally and vertically producing crisper glyphs (but arguably distorting them a bit more).
To do it I had to

  1. Set hinting mode to something other than 'slight' (as 'slight' is unaffected by the hinting engine or autohint settings), e.g.:
    Code:
    eselect fontfonfig enable 10-hinting-medium.conf
    eselect fontconfig disable 10-hinting-slight.conf

  2. Change the hinting engine to v35 by putting in environment
    Code:
    export FREETYPE_PROPERTIES="truetype:interpreter-version=35"

    (I put it in /etc/profile.d/freetype.sh for it to remain globally).


For more info read Freetype 2.7 changes and "The new v40 TrueType interpreter mode" article. The article of course if biased against the old v35 engine, and I get it -- it's the old thing. But it's a matter of taste, and I don't want to embrace the new hinter... not yet anyway.

If anyone stumbles upon this thread and is clueless about which settings to use, (re-)emerge freetype with +utils USE flag, and run:
Code:
ftview 12 /usr/share/fonts/dejavu/DejaVuSansMono.ttf

and try out all the hinting permutations (it's how I discovered what settings to use).
_________________
"I reject your reality and substitute my own" - A. Savage
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum