Skip to content

Instantly share code, notes, and snippets.

@juukie
Last active March 20, 2016 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juukie/8469405605ef2ee0e171 to your computer and use it in GitHub Desktop.
Save juukie/8469405605ef2ee0e171 to your computer and use it in GitHub Desktop.
CentOS verbetering font rendering voor PDF
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
Voor betere fontrendering met PDF generators als phantomjs en wkhtml:
Kopieer XML (bron: https://wiki.debian.org/Fonts#Subpixel-hinting_and_Font-smoothing) naar /etc/fonts/conf.d/
Zie: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment