# Getting Beautiful Fonts in Gentoo

## kev009

Hello all,

I just wrote a guide for enabling some common fontconfig tricks and making Gentoo typography look nicer than the defaults.

http://www.kev009.com/wp/2009/12/getting-beautiful-fonts-in-gentoo-linux/

Regards,

Kevin

----------

## ppurka

Good guide!  :Very Happy: 

Additionally, the following might also help if you put it in your ~/.fonts.conf:

```
 <!-- Hinting -->

 <match target="font" >

  <edit mode="assign" name="hintstyle" >

   <const>hintfull</const>

  </edit>

 </match>

 <match target="font" >

  <edit mode="assign" name="antialias" >

   <bool>true</bool>

  </edit>

 </match>

 <!-- Disable autohint for bold fonts, o/w they look *too* bold -->

 <match target="font" >

  <test compare="more" name="weight" >

   <const>medium</const>

  </test>

  <edit mode="assign" name="autohint" >

   <bool>false</bool>

  </edit>

 </match>

```

Here is how teh same wikipedia page looks in mine: http://omploader.org/vMnd4Ng

----------

## kev009

Thanks for the tip.  I've included my ~/.fonts.conf on the page.

----------

## StinkingMonkey

thank you , noticeable difference particularly in my terminal , i can now read the bold parts  :Smile: 

----------

## mikegpitt

Nice guide!  Personally, I've been quite happy with the fonts on my machines, but that is probably because I do some of the things you suggest.  I will need to try the remaining suggestions to see if it impacts my configuration.

----------

## NeddySeagoon

Moved from Desktop Environments to Documentation, Tips & Tricks.

As its not a support question

----------

## luispa

Thank you, good guide !

Luis

----------

## John R. Graham

The type1 (or type1-fonts, which is what I think you meant) USE flag no longer exists, but that's just a nit.  Fabulous guide.    :Very Happy: 

- John

----------

## mack1

Thanks, nice guide  :Very Happy:  !

----------

## luqas

Thanks kev.  Nice guide and bookmarked.

----------

## mjf55

Just found this guide.  Very Nice job Kevin.  now my fonts look great

----------

## depontius

People have generously provided "~/.fonts.conf" files.  Is /etc/fonts/fonts.conf an equivalent for a site-wide deployment? (actually "/etc/fonts/fonts.d/51-local.conf"?)  I'd rather put this in there than update everyone's (in the family on a home machine) account.

----------

## bobspencer123

Thank's for the nice guide I will definitely give these a try tonite when I get home. I also found very amusing (and informative) your "Godwin's Law" response to Pedro on your blog  :Smile:  ... Kinda made my day.

----------

## d2_racing

I'm gonna test that for sure.

----------

## gregool

[borat_voice ] very good [/borat_voice]

----------

## Nuggs

Sweet, thanks for this!

----------

## XQZS

Good.

But in http://wiki.gentoo.org/wiki/Fontconfig, autohint is sugested to be disable:

 *Quote:*   

> 
> 
> Autohinter attempts to do automatic hinting disregarding any existing hinting information. Until recently it was the default because TrueType2 was covered by patents but now that they have expired there's very little reason to use it. From technical point of view it does better than broken or no hinting information but it will be strongly sub-optimal for fonts with good hinting information. Generally system fonts are of the second kind so autohinter should not be used. 
> 
> 

 Last edited by XQZS on Wed May 21, 2014 1:00 am; edited 1 time in total

----------

## 1clue

Thank you!

----------

## manueltorrez

nice work....

 thanx...  :Smile: 

----------

## dmnc

Enabling 70-no-bitmaps.conf solve the issue in the Chromium (v.36) but breaks my terminal where I'm using 'Fixed' font. So better to have ugly web ...

Any clue please?

screenshots: http://imgur.com/a/sty8q

----------

## dmnc

 *dmnc wrote:*   

> Enabling 70-no-bitmaps.conf solve the issue in the Chromium (v.36) but breaks my terminal where I'm using 'Fixed' font. So better to have ugly web ...
> 
> Any clue please?
> 
> screenshots: http://imgur.com/a/sty8q

 

Solution: http://superuser.com/a/766803/29696 (29-replace-bitmap-fonts.conf)

----------

## defer-

I always liked the default rendering with eselect fontconfig configured to my taste

EDIT:

This is how i got very sharp and nice fonts:

1. Disable everything you dont absolutely need from eselect fontconfig.

2. Restart X.

My settings:

```
  [2]   10-no-sub-pixel.conf *

  [17]  30-metric-aliases.conf *

  [18]  30-urw-aliases.conf *

  [19]  40-nonlatin.conf *

  [20]  45-latin.conf *

  [21]  49-sansserif.conf *

  [22]  50-user.conf *

  [23]  51-local.conf *

  [27]  60-latin.conf *
```

----------

## Vicfred

very nice also your blog looks fine   :Wink: 

----------

## jmg36

Got fonts to look proper in Chromium using the following eselect fontconfig setup on a dual Dell 19" display (2560x1024):

$ equery l chromium

 * Searching for chromium ...

[IP-] [  ] www-client/chromium-36.0.1985.103:0

$ eselect fontconfig list

Available fontconfig .conf files (* is enabled):

  [1]   10-autohint.conf *

  [2]   10-no-sub-pixel.conf

  [3]   10-scale-bitmap-fonts.conf

  [4]   10-sub-pixel-bgr.conf

  [5]   10-sub-pixel-rgb.conf *

  [6]   10-sub-pixel-vbgr.conf

  [7]   10-sub-pixel-vrgb.conf

  [8]   10-unhinted.conf

  [9]   11-lcdfilter-default.conf *

  [10]  11-lcdfilter-legacy.conf

  [11]  11-lcdfilter-light.conf

  [12]  20-unhint-small-dejavu-sans.conf *

  [13]  20-unhint-small-dejavu-sans-mono.conf *

  [14]  20-unhint-small-dejavu-serif.conf *

  [15]  20-unhint-small-vera.conf *

  [16]  25-ttf-arphic-ukai-render.conf *

  [17]  25-ttf-arphic-uming-bitmaps.conf

  [18]  25-ttf-arphic-uming-render.conf *

  [19]  25-unhint-nonlatin.conf *

  [20]  30-metric-aliases.conf *

  [21]  30-urw-aliases.conf *

  [22]  35-ttf-arphic-ukai-aliases.conf *

  [23]  35-ttf-arphic-uming-aliases.conf *

  [24]  40-nonlatin.conf *

  [25]  41-ttf-arphic-ukai.conf *

  [26]  41-ttf-arphic-uming.conf *

  [27]  42-luxi-mono.conf *

  [28]  44-wqy-zenhei.conf *

  [29]  45-latin.conf *

  [30]  49-sansserif.conf *

  [31]  50-user.conf *

  [32]  51-local.conf *

  [33]  57-dejavu-sans.conf *

  [34]  57-dejavu-sans-mono.conf *

  [35]  57-dejavu-serif.conf *

  [36]  59-google-droid-sans.conf *

  [37]  59-google-droid-sans-mono.conf *

  [38]  59-google-droid-serif.conf *

  [39]  60-latin.conf *

  [40]  64-ttf-arphic-uming.conf *

  [41]  65-fonts-persian.conf *

  [42]  65-khmer.conf *

  [43]  65-nonlatin.conf *

  [44]  66-ja-ipafonts.conf *

  [45]  66-lohit-assamese.conf *

  [46]  66-lohit-bengali.conf *

  [47]  66-lohit-gujarati.conf *

  [48]  66-lohit-hindi.conf *

  [49]  66-lohit-kannada.conf *

  [50]  66-lohit-kashmiri@devanagari.conf *

  [51]  66-lohit-konkani.conf *

  [52]  66-lohit-maithili.conf *

  [53]  66-lohit-marathi.conf *

  [54]  66-lohit-oriya.conf *

  [55]  66-lohit-punjabi.conf *

  [56]  66-lohit-sindhi@devanagari.conf *

  [57]  66-lohit-tamil.conf *

  [58]  66-lohit-telugu.conf *

  [59]  66-wqy-zenhei-sharp.conf *

  [60]  66-wqy-zenhei-sharp-no13px.conf *

  [61]  67-lohit-malayalam.conf *

  [62]  67-lohit-nepali.conf *

  [63]  69-unifont.conf *

  [64]  70-no-bitmaps.conf *

  [65]  70-yes-bitmaps.conf

  [66]  75-ttf-arphic-ukai-select.conf *

  [67]  80-delicious.conf *

  [68]  90-synthetic.conf *

  [69]  90-ttf-arphic-ukai-embolden.conf *

  [70]  90-ttf-arphic-uming-embolden.conf *

  [71]  99pdftoopvp.conf *

----------

## Massimo B.

Hi thanks for that hints.

I came here because after moving my physical Gentoo desktop (Xfce) into a VMware fonts in Firefox became bad... I never thought about eselect fontconfig and just enabled the DejaVu fonts in Xfce and Firefox.

I also enabled anti-aliasing and hinting, but in the VM that did not help.

What exactly does eselect fontconfig do? Why not enabling everyhing there? Is this providing the fonts to be actually selectable from the Gtk-Apps? What happens if I'm using DejaVu Sans without enabling

[26]  57-dejavu-sans.conf?

btw. for terminals I always preferred the media-fonts/terminus-font, for X and also consolefonts.

----------

