Fontconfig

New to Debian (Or Linux in general)? Ask your questions here!

Fontconfig

Postby pawRoot » 2018-01-19 02:02

Hi

I was able to configure my fonts almost perfectly, but after my new configuration, some fonts look "flattened".

Example:

Image

^All the green links look flattened, and i don't know if it's some font settings, or type of font itself, no idea.

Here is my configs:

.Xresources
Code: Select all
Xft.antialias:  1
Xft.autohint:   0
Xft.hinting:    0
Xft.hintstyle:  hintnone
Xft.lcdfilter:  lcddefault
Xft.rgba:       rgb


/etc/fonts/local.conf
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
  <match target="font">     <edit mode="append" name="antialias">   <bool>true</bool>       </edit></match>
  <match target="font">     <edit mode="append" name="autohint">    <bool>false</bool>      </edit></match>
  <match target="font">     <edit mode="append" name="hintstyle">   <const>hintnone</const>     </edit></match>
  <match target="font">     <edit mode="append" name="hinting"> <bool>false</bool>      </edit></match>
  <match target="pattern">  <edit mode="append" name="lcdfilter">   <const>lcddefault</const>   </edit></match>

 <alias>
  <family>sans-serif</family>
   <prefer>
    <family>Noto Sans</family>
    <family>Arimo</family>
    <family>Liberation Sans</family>
    <family>DejaVu Sans</family>
   </prefer>
 </alias>

 <alias>
  <family>serif</family>
   <prefer>
    <family>Noto Serif</family>
    <family>Tinos</family>
    <family>Liberation Serif</family>
    <family>DejaVu Serif</family>
   </prefer>
 </alias>

 <alias>
  <family>monospace</family>
   <prefer>
    <family>Noto Mono</family>
    <family>Cousine</family>
    <family>Liberation Mono</family>
    <family>DejaVu Sans Mono</family>
   </prefer>
 </alias>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Verdana</string></test>
  <edit binding="same" mode="prepend" name="family"><string>DejaVu Sans</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Arial Black</string></test>
  <edit binding="same" mode="prepend" name="family"><string>DejaVu Sans</string></edit>
  <edit mode="assign" name="weight"><double>200</double></edit>
</match>

<match target="font"> <!-- Switch off hinging for DejaVu Sans -->
  <test compare="eq" name="family" qual="any"><string>DejaVu Sans</string></test>
  <edit name="hinting" mode="assign"><bool>false</bool></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Tahoma</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Noto Sans</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Arial</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Arimo</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Times New Roman</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Tinos</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Georgia</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Noto Serif</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Impact</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Noto Serif</string></edit>
  <edit mode="assign" name="weight"><double>200</double></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Courier New</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Nimbus Mono L</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Trebuchet MS</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Linux Biolinum O</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Lucida Console</string></test>
  <edit binding="same" mode="prepend" name="family"><string>DejaVu Sans Mono</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Lucida Sans Unicode</string></test>
  <edit binding="same" mode="prepend" name="family"><string>DejaVu Sans</string></edit>
</match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Palatinio Linotype</string></test>
  <edit binding="same" mode="prepend" name="family"><string>URW Palladio L</string></edit>
 </match>

<match target="pattern">
  <test compare="eq" name="family" qual="any"><string>Consolas</string></test>
  <edit binding="same" mode="prepend" name="family"><string>Inconsolata</string></edit>
</match>

</fontconfig>


Any ideas? :roll:
Last edited by pawRoot on 2018-01-19 13:43, edited 2 times in total.
User avatar
pawRoot
 
Posts: 500
Joined: 2016-12-28 18:26
Location: Poland

Re: Fontconfig

Postby Head_on_a_Stick » 2018-01-19 06:07

BunsenLabs uses:
Code: Select all
Xft.autohint: true
Xft.antialias: true
Xft.hinting: true
Xft.hintstyle: hintslight
!Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault

& fonts.conf: https://raw.githubusercontent.com/Bunse ... fonts.conf

Does that help?
"An you're a prick. Prick on a stick." — acewiza
User avatar
Head_on_a_Stick
 
Posts: 7461
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Fontconfig

Postby pawRoot » 2018-01-19 13:06

Now it's perfect, thanks :)

Btw. is it necessary to run fc-cache after changing fontconfig or it doesn't affect it at all?
User avatar
pawRoot
 
Posts: 500
Joined: 2016-12-28 18:26
Location: Poland

Re: Fontconfig

Postby pawRoot » 2018-01-19 13:43

Well actually some fonts are still looking awful, i guess i will get back to Infinality.
User avatar
pawRoot
 
Posts: 500
Joined: 2016-12-28 18:26
Location: Poland


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable