Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Fontconfig

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
pawRoot
Posts: 603
Joined: 2016-12-28 18:26
Has thanked: 1 time
Been thanked: 1 time

Fontconfig

#1 Post by pawRoot »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Fontconfig

#2 Post by Head_on_a_Stick »

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?
deadbang

User avatar
pawRoot
Posts: 603
Joined: 2016-12-28 18:26
Has thanked: 1 time
Been thanked: 1 time

Re: Fontconfig

#3 Post by pawRoot »

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: 603
Joined: 2016-12-28 18:26
Has thanked: 1 time
Been thanked: 1 time

Re: Fontconfig

#4 Post by pawRoot »

Well actually some fonts are still looking awful, i guess i will get back to Infinality.

Post Reply