Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fontconfig recommendation
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1834
Location: PB, Germany

PostPosted: Tue Feb 14, 2023 1:17 pm    Post subject: fontconfig recommendation Reply with quote

Hi,

reading https://wiki.gentoo.org/wiki/Fontconfig I'm a bit lost what I should set on eselect fontconfig and what I should emerge.
The old days when I was using eselect-infinality and media-libs/fontconfig-ultimate are gone since a long time now.

I'm using Xfce, have enabled hinting there and have set the "Exo 2 Regular 8" as default font and "Terminus Regular 8" as default monospace font, [x] enable anti-aliasing, hinting full, sub-pixel order rgb.
Now what do I need to enable in eselect fontconfig? Do I need any of 10-autohint.conf 10-hinting-full.conf ... to get hinting working correctly?

According to the Wiki, if the Gentoo Fonts team recommendation for default Latin fonts is media-fonts/liberation-fonts, do I need to enable 60-liberation.conf?
Which setups are fully working font setups so I could compare what I do prefer...

If the WM like Xfce already sets it's own default font, what does 60-liberation.conf set then?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1834
Location: PB, Germany

PostPosted: Tue Feb 14, 2023 1:24 pm    Post subject: Reply with quote

It feels like fontconfig does only set defaults for environments without having a WM setting all that already.
That means it won't make a difference at least within my Xfce session. To re-apply the same settings for working without Xfce in some situations I could set:
Code:
# eselect fontconfig enable 10-sub-pixel-rgb.conf 11-lcdfilter-default.conf 60-liberation.conf
Is that true?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Feb 14, 2023 1:38 pm    Post subject: Re: fontconfig recommendation Reply with quote

Massimo B. wrote:
According to the Wiki, if the Gentoo Fonts team recommendation for default Latin fonts is media-fonts/liberation-fonts, do I need to enable 60-liberation.conf?
Which setups are fully working font setups so I could compare what I do prefer...

If the WM like Xfce already sets it's own default font, what does 60-liberation.conf set then?

Take a look at /etc/fonts/conf.avail/60-liberation.conf:
Code:
#cat /etc/fonts/conf.avail/60-liberation.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

        <!-- Symlinking this file to /etc/fonts/conf.d/ will allow
         you to use liberation fonts instead of the microsoft truetype fonts.
         (from http://uwstopia.nl/blog/2007/05/free-your-fonts) -->

        <!-- Liberation fonts -->
        <match target="pattern">
                <test qual="any" name="family"><string>Times New Roman</string></test>
                <edit name="family" mode="assign"><string>Liberation Serif</string></edit>
        </match>
        <match target="pattern">
                <test qual="any" name="family"><string>Arial</string></test>
                <edit name="family" mode="assign"><string>Liberation Sans</string></edit>
        </match>
        <match target="pattern">
                <test qual="any" name="family"><string>Courier</string></test>
                <edit name="family" mode="assign"><string>Liberation Mono</string></edit>
        </match>
        <match target="pattern">
                <test qual="any" name="family"><string>Arial Narrow</string></test>
                <edit name="family" mode="assign"><string>Liberation Sans Narrow</string></edit>
        </match>
</fontconfig>

If you enable 60-liberation.conf, programs and GUIs that use the fontconfig mechanism will use Liberation fonts instead of Times New Roman, Arial and Courier.

Do NOT enable 60-liberation.conf if Times New Roman, Arial and Courier are installed on your machine.

Do NOT enable 60-liberation.conf if you want another font to be used instead of Times New Roman, Arial and Courier.

Enable 60-liberation.conf if Times New Roman, Arial and Courier are NOT installed on your machine and if you want your machine to use Liberation instead of those fonts.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1834
Location: PB, Germany

PostPosted: Thu Jan 30, 2025 9:34 am    Post subject: Reply with quote

Coming back to this topic.

On #gentoo-desktop we came to speak about terminal fonts, my favourite is media-fonts/terminus-font because all other fonts are rendering really worse.
(too bad that this forum doesn't provide a long-time picture hosting... these screenshots will disappear soon:(Take care to disable scaling in the browser, in Firefox I need to click the picture once.)

Beside terminal fonts, my default Xfce font is Exo 2:
Another user said, Liberation is rendering fine on his machine, and that my hinting is broken somehow, making be replace it by a fixed bitmap font.
I'm using Xfce on Xorg. My Settings->Appearance->Fonts is set to:
Code:
[x] Enable anti-aliasing
Hinting: Full
Sub-pixel-order: RGB
DPI: [ ] Custom DPI setting /

I was using fontconfig-ultimate in the past:
https://forums.gentoo.org/viewtopic-t-993030.html
https://forums.gentoo.org/viewtopic-t-1132827html

Today I still have media-fonts/fonts-meta Maybe some leftovers are breaking something?
Code:
root ~ tree /etc/fonts/
/etc/fonts/
├── conf.avail
│   ├── 05-reset-dirs-sample.conf
│   ├── 09-autohint-if-no-hinting.conf
│   ├── 10-autohint.conf
│   ├── 10-hinting-full.conf
│   ├── 10-hinting-medium.conf
│   ├── 10-hinting-none.conf
│   ├── 10-hinting-slight.conf
│   ├── 10-no-antialias.conf
│   ├── 10-powerline-symbols.conf
│   ├── 10-scale-bitmap-fonts.conf
│   ├── 10-sub-pixel-bgr.conf
│   ├── 10-sub-pixel-none.conf
│   ├── 10-sub-pixel-rgb.conf
│   ├── 10-sub-pixel-vbgr.conf
│   ├── 10-sub-pixel-vrgb.conf
│   ├── 10-unhinted.conf
│   ├── 10-yes-antialias.conf
│   ├── 11-lcdfilter-default.conf
│   ├── 11-lcdfilter-legacy.conf
│   ├── 11-lcdfilter-light.conf
│   ├── 11-lcdfilter-none.conf
│   ├── 20-unhint-small-dejavu-sans.conf
│   ├── 20-unhint-small-dejavu-sans-mono.conf
│   ├── 20-unhint-small-dejavu-serif.conf
│   ├── 20-unhint-small-vera.conf
│   ├── 25-unhint-nonlatin.conf
│   ├── 30-metric-aliases.conf
│   ├── 35-lang-normalize.conf
│   ├── 40-nonlatin.conf
│   ├── 42-luxi-mono.conf
│   ├── 45-generic.conf
│   ├── 45-latin.conf
│   ├── 48-spacing.conf
│   ├── 49-sansserif.conf
│   ├── 50-user.conf
│   ├── 51-local.conf
│   ├── 57-dejavu-sans.conf
│   ├── 57-dejavu-sans-mono.conf
│   ├── 57-dejavu-serif.conf
│   ├── 59-google-droid-sans.conf
│   ├── 59-google-droid-sans-mono.conf
│   ├── 59-google-droid-serif.conf
│   ├── 60-generic.conf
│   ├── 60-latin.conf
│   ├── 60-liberation.conf
│   ├── 61-urw-bookman.conf
│   ├── 61-urw-c059.conf
│   ├── 61-urw-d050000l.conf
│   ├── 61-urw-fallback-backwards.conf
│   ├── 61-urw-fallback-generics.conf
│   ├── 61-urw-fallback-specifics.conf
│   ├── 61-urw-gothic.conf
│   ├── 61-urw-nimbus-mono-ps.conf
│   ├── 61-urw-nimbus-roman.conf
│   ├── 61-urw-nimbus-sans.conf
│   ├── 61-urw-p052.conf
│   ├── 61-urw-standard-symbols-ps.conf
│   ├── 61-urw-z003.conf
│   ├── 62-crosextra-caladea.conf
│   ├── 62-crosextra-carlito.conf
│   ├── 65-fonts-persian.conf
│   ├── 65-khmer.conf
│   ├── 65-nonlatin.conf
│   ├── 66-noto-mono.conf
│   ├── 66-noto-sans.conf
│   ├── 66-noto-serif.conf
│   ├── 69-unifont.conf
│   ├── 70-no-bitmaps.conf
│   ├── 70-yes-bitmaps.conf
│   ├── 75-noto-emoji-fallback.conf
│   ├── 75-yes-terminus.conf
│   ├── 80-delicious.conf
│   ├── 90-roboto-regular.conf
│   └── 90-synthetic.conf
├── conf.d
│   ├── 10-sub-pixel-rgb.conf -> ../conf.avail/10-sub-pixel-rgb.conf
│   ├── 10-yes-antialias.conf -> ../conf.avail/10-yes-antialias.conf
│   ├── 11-lcdfilter-default.conf -> ../conf.avail/11-lcdfilter-default.conf
│   ├── 42-luxi-mono.conf -> ../conf.avail/42-luxi-mono.conf
│   ├── 60-liberation.conf -> ../conf.avail/60-liberation.conf
│   ├── disabled
│   │   ├── 10-autohint.conf -> /etc/fonts/conf.avail/10-autohint.conf
│   │   ├── 11-lcdfilter-default.conf -> /etc/fonts/conf.avail/11-lcdfilter-default.conf
│   │   ├── 20-unhint-small-dejavu-sans.conf -> /etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf
│   │   ├── 20-unhint-small-dejavu-sans-mono.conf -> /etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf
│   │   ├── 20-unhint-small-dejavu-serif.conf -> /etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf
│   │   ├── 25-unhint-nonlatin.conf -> /etc/fonts/conf.avail/25-unhint-nonlatin.conf
│   │   ├── 57-dejavu-sans.conf -> /etc/fonts/conf.avail/57-dejavu-sans.conf
│   │   ├── 57-dejavu-sans-mono.conf -> /etc/fonts/conf.avail/57-dejavu-sans-mono.conf
│   │   └── 57-dejavu-serif.conf -> /etc/fonts/conf.avail/57-dejavu-serif.conf
│   ├── disabled.2
│   └── README
├── fonts.conf
└── PowerlineSymbols.otf

5 directories, 91 files
Code:
root  ~  eselect fontconfig list
Available fontconfig .conf files (* is enabled):
  [1]   05-reset-dirs-sample.conf
  [2]   09-autohint-if-no-hinting.conf
  [3]   10-autohint.conf
  [4]   10-hinting-full.conf
  [5]   10-hinting-medium.conf
  [6]   10-hinting-none.conf
  [7]   10-hinting-slight.conf
  [8]   10-no-antialias.conf
  [9]   10-powerline-symbols.conf
  [10]  10-scale-bitmap-fonts.conf
  [11]  10-sub-pixel-bgr.conf
  [12]  10-sub-pixel-none.conf
  [13]  10-sub-pixel-rgb.conf *
  [14]  10-sub-pixel-vbgr.conf
  [15]  10-sub-pixel-vrgb.conf
  [16]  10-unhinted.conf
  [17]  10-yes-antialias.conf *
  [18]  11-lcdfilter-default.conf *
  [19]  11-lcdfilter-legacy.conf
  [20]  11-lcdfilter-light.conf
  [21]  11-lcdfilter-none.conf
  [22]  20-unhint-small-dejavu-sans.conf
  [23]  20-unhint-small-dejavu-sans-mono.conf
  [24]  20-unhint-small-dejavu-serif.conf
  [25]  20-unhint-small-vera.conf
  [26]  25-unhint-nonlatin.conf
  [27]  30-metric-aliases.conf
  [28]  35-lang-normalize.conf
  [29]  40-nonlatin.conf
  [30]  42-luxi-mono.conf *
  [31]  45-generic.conf
  [32]  45-latin.conf
  [33]  48-spacing.conf
  [34]  49-sansserif.conf
  [35]  50-user.conf
  [36]  51-local.conf
  [37]  57-dejavu-sans.conf
  [38]  57-dejavu-sans-mono.conf
  [39]  57-dejavu-serif.conf
  [40]  59-google-droid-sans.conf
  [41]  59-google-droid-sans-mono.conf
  [42]  59-google-droid-serif.conf
  [43]  60-generic.conf
  [44]  60-latin.conf
  [45]  60-liberation.conf *
  [46]  61-urw-bookman.conf
  [47]  61-urw-c059.conf
  [48]  61-urw-d050000l.conf
  [49]  61-urw-fallback-backwards.conf
  [50]  61-urw-fallback-generics.conf
  [51]  61-urw-fallback-specifics.conf
  [52]  61-urw-gothic.conf
  [53]  61-urw-nimbus-mono-ps.conf
  [54]  61-urw-nimbus-roman.conf
  [55]  61-urw-nimbus-sans.conf
  [56]  61-urw-p052.conf
  [57]  61-urw-standard-symbols-ps.conf
  [58]  61-urw-z003.conf
  [59]  62-crosextra-caladea.conf
  [60]  62-crosextra-carlito.conf
  [61]  65-fonts-persian.conf
  [62]  65-khmer.conf
  [63]  65-nonlatin.conf
  [64]  66-noto-mono.conf
  [65]  66-noto-sans.conf
  [66]  66-noto-serif.conf
  [67]  69-unifont.conf
  [68]  70-no-bitmaps.conf
  [69]  70-yes-bitmaps.conf
  [70]  75-noto-emoji-fallback.conf
  [71]  75-yes-terminus.conf
  [72]  80-delicious.conf
  [73]  90-roboto-regular.conf
  [74]  90-synthetic.conf
Comparing the eselect fontconfig list with the other user, I enabled the same stuff now like him. But I guess that will need a reboot…:
Code:
root ~ eselect fontconfig list
Available fontconfig .conf files (* is enabled):
  [1]   05-reset-dirs-sample.conf
  [2]   09-autohint-if-no-hinting.conf
  [3]   10-autohint.conf
  [4]   10-hinting-full.conf
  [5]   10-hinting-medium.conf
  [6]   10-hinting-none.conf
  [7]   10-hinting-slight.conf *
  [8]   10-no-antialias.conf
  [9]   10-powerline-symbols.conf
  [10]  10-scale-bitmap-fonts.conf *
  [11]  10-sub-pixel-bgr.conf
  [12]  10-sub-pixel-none.conf *
  [13]  10-sub-pixel-rgb.conf *
  [14]  10-sub-pixel-vbgr.conf
  [15]  10-sub-pixel-vrgb.conf
  [16]  10-unhinted.conf
  [17]  10-yes-antialias.conf *
  [18]  11-lcdfilter-default.conf *
  [19]  11-lcdfilter-legacy.conf
  [20]  11-lcdfilter-light.conf
  [21]  11-lcdfilter-none.conf
  [22]  20-unhint-small-dejavu-sans.conf
  [23]  20-unhint-small-dejavu-sans-mono.conf
  [24]  20-unhint-small-dejavu-serif.conf
  [25]  20-unhint-small-vera.conf *
  [26]  25-unhint-nonlatin.conf *
  [27]  30-metric-aliases.conf *
  [28]  35-lang-normalize.conf
  [29]  40-nonlatin.conf *
  [30]  42-luxi-mono.conf *
  [31]  45-generic.conf *
  [32]  45-latin.conf *
  [33]  48-spacing.conf *
  [34]  49-sansserif.conf *
  [35]  50-user.conf *
  [36]  51-local.conf *
  [37]  57-dejavu-sans.conf
  [38]  57-dejavu-sans-mono.conf
  [39]  57-dejavu-serif.conf
  [40]  59-google-droid-sans.conf
  [41]  59-google-droid-sans-mono.conf
  [42]  59-google-droid-serif.conf
  [43]  60-generic.conf *
  [44]  60-latin.conf *
  [45]  60-liberation.conf *
  [46]  61-urw-bookman.conf
  [47]  61-urw-c059.conf
  [48]  61-urw-d050000l.conf
  [49]  61-urw-fallback-backwards.conf
  [50]  61-urw-fallback-generics.conf
  [51]  61-urw-fallback-specifics.conf
  [52]  61-urw-gothic.conf
  [53]  61-urw-nimbus-mono-ps.conf
  [54]  61-urw-nimbus-roman.conf
  [55]  61-urw-nimbus-sans.conf
  [56]  61-urw-p052.conf
  [57]  61-urw-standard-symbols-ps.conf
  [58]  61-urw-z003.conf
  [59]  62-crosextra-caladea.conf
  [60]  62-crosextra-carlito.conf
  [61]  65-fonts-persian.conf *
  [62]  65-khmer.conf
  [63]  65-nonlatin.conf *
  [64]  66-noto-mono.conf
  [65]  66-noto-sans.conf
  [66]  66-noto-serif.conf
  [67]  69-unifont.conf *
  [68]  70-no-bitmaps.conf
  [69]  70-yes-bitmaps.conf
  [70]  75-noto-emoji-fallback.conf *
  [71]  75-yes-terminus.conf
  [72]  80-delicious.conf *
  [73]  90-roboto-regular.conf
  [74]  90-synthetic.conf *

What I understood so far, all these settings only define which replacement fonts are taken and don't affect the hinting? But I remember old fontconfig-ultimate was affecting hinting somehow…
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum