Necoro’s Blog

Blog? Blog? There is no blog…

Posts Tagged ‘web fonts

Matching web-fonts with fontconfig

with 2 comments

I had a small issue today: A font used on a webpage and loaded via CSS was not rendered as it should be. I searched quite some time to find out if it is matched by font-config, and if so, how. So here is the answer: it is matched against the name defined in the CSS prepended by a @font-face:. With this I was able to add stuff like the following to my ~/.fonts.conf:

<match target="font">
  <test name="family">
    <string>@font-face:Thesis</string>
  </test>
  <edit name="hintstyle" mode="assign">
    <const>hintslight</const>
  </edit>
 </match>

Written by Necoro

April 29, 2013 at 22:30

Posted in Howtos

Tagged with , , ,