Skip to content

I'm having some trouble understanding and utilizing how Fonts and Fontconfig work. Can anyone help me?

Hello.

I am quite new to Linux, and Arch. My brother got me into Linux by first introducing me to Ubuntu, and then Linux Mint, which i used for quite a while.

I loved looking up info on Arch, and i eventually installed it a couple days ago, and i love it! Linux started to make more sense to me after this. However, there is one problem i am confused about; fonts.

My fonts are okay-ish looking, but not really how I'd like them to be. The problem is they aren't rendered that well and just look quite dull compared to using the same font on a different distribution, where the fonts would look clear and crisp.

I realize this is most likely because i have not setup my fontconfig correctly.

I was reading the wiki, and first it showed me how to enable some of those presets by creating symbolic links. Then i got a bit confused, because the rest of examples and the wiki doesn't really mention using it again. It starts talking about a fontconfig file.

So it seems i have the choices of:

  • Creating symbolic links for each option i would like to enable in ~/.config/fontconfig/conf.d/

  • Creating a file in the same path with the options written in the correct format

The second seems like a much more ideal choice, so that is what i tried. However, after a restart, i could not identify any changes.

I looked up troubleshooting, and it said i could try changing the number where the presets are kept on the user file to a higher priority. I tried this, and still no results.

I'm quite puzzled. What am i doing wrong? I will provide some details:

This is the path and the file name i made. I am also currently using Inconsolata as my main font.

~/.config/fontconfig/conf.d/fontconfig

This is the contents (I have tried multiple other options, but they do not yield any results either.).

<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="antialias" mode="assign"><bool>true</bool></edit>
    <edit name="hinting" mode="assign"><bool>true</bool></edit>
    <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
    <edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
    <edit name="rgba" mode="assign"><const>rgb</const></edit>
  </match>
</fontconfig>

I'd greatly appreciate help. Thank you.

EDIT:

I should mention that i would prefer not to install 3rd party repos.

Edited 10 Sep 2015. We only hold this version.

5 points9 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
5 · 100% up
Kind
Text
ID
3kh0tw

Author

1
posts
0
comments
0
media
View profile

9 comments

I realize this is most likely because i have not setup my fontconfig correctly.

This is not your fault; Fontconfig has terrible default settings.

Luckily for you, I created a package yesterday that switches to sane settings. No need to patch FreeType or Fontconfig.

  1. Remove all the settings that you made.
  2. yaourt -S fontconfig-good-defaults
  3. Log out and in again.
1 points

What DE are you using? These settings might get overwritten. And you'll never get the same font rendering as on Ubuntu unless you install patched font libraries; be it the Ubutunu one (freetype2-ubuntu, fontconfig-ubuntu, cairo-ubuntu) or Infinality.

1 points

Try using the default fontconfig with freetype2-infinality. I'm pretty sure it can depend on what fonts you use though.

1 points

Some ideas:

  1. FYI, you don't need to restart to see changes. Just exit and relaunch an application that would be affected by fontconfig changes. (say... pidgin?). Run fc-cache after changes to make sure.
  2. You might need to have the file end in .conf for it to pick it up.
  3. I'd try the simpler ~/.config/fontconfig/fonts.conf, first maybe to see if it's picking it up. Make a big change too like disabling anti-aliasing and hinting.
  4. It might be possible something in the /etc/fonts/conf.d is overriding settings?

EDIT: added more points

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.