Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Font cleanup / organisation
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
mx_
n00b
n00b


Joined: 29 Sep 2017
Posts: 8

PostPosted: Mon Mar 11, 2024 11:15 am    Post subject: Font cleanup / organisation Reply with quote

I think most people don't really care about fonts and likewise the Gentoo documentation about it is sparse (https://wiki.gentoo.org/wiki/Fonts).
It basically says install the meta package that should cover it, whatever.

What is the best way to cleanup the installed fonts, select the best for me, install them, enable them by default (systemwide)?

Example: I never cared about the packages; I bet some of Plasma, X, Wayland, LaTeX, Libreoffice, Firefox, Chromium probably installed something; eselect fontconfig list shows over 80 fonts or font packages, some are enabled (by whom and why?), some not (why not?) and what does enable even mean for a font?

I have a MS Word document in Libreoffice and it originally uses the MS corefonts of course, which I don't have installed.
Instead I get some replacement fonts, but don't actually see which ones. So I could use the Liberation fonts by RedHat, but they only cover 3 fonts. After some research I found out that there is also a Google font package, the croscorefonts with additional ones that also cover these and more fonts and more characters.
And when I look at what emerge fonts-meta tries to pull in, I also find Open Sans "the only font you’ll ever need" under it, also developed by Google, for print, web and mobile interfaces and then there is noto too for the same purpose... what gives??

How do I find what I need, use it everywhere and get rid of the garbage?
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 324
Location: Naarm/Melbourne, Australia

PostPosted: Tue Mar 12, 2024 1:44 am    Post subject: Re: Font cleanup / organisation Reply with quote

mx_ wrote:
I think most people don't really care about fonts and likewise the Gentoo documentation about it is sparse (https://wiki.gentoo.org/wiki/Fonts).

You're in luck: i both care about fonts and regularly spend time trying to improve the wiki, so perhaps this discussion will lead to some improvements.

mx_ wrote:
It basically says install the meta package that should cover it, whatever.

Looking at the Fonts page, that seems .... a bit of an exaggeration. Also, that page links to the Fontconfig page, which provides additional information.

To what extent do you feel that page addresses at least some of your questions? Could you please provide a simple list of questions that you feel the two pages together don't answer Hopefully i can try to answer some of them. For example, regarding your specific question:

mx_ wrote:
How do I find what I need, use it everywhere and get rid of the garbage?

Are you asking for a single place in which one can specify e.g. "Use this serif font, use this sans-serif font, use this monospace font, everywhere and for everything"? If so, then unfortunately there currently isn't (as far as i'm aware) such a thing, which would require work to create a unified 'interface' that would hide decades of various approaches to fonts on various *n*x systems (i.e. going back to before Linux even existed).
Back to top
View user's profile Send private message
mx_
n00b
n00b


Joined: 29 Sep 2017
Posts: 8

PostPosted: Tue Mar 12, 2024 10:19 am    Post subject: Re: Font cleanup / organisation Reply with quote

ok, I did not see that in addition to the Fonts page a Fontconfig page exists (and that fontconfig itself exists and what its purpose is).
I was digging around in the package contents and found the config snippets and noticed how they are linked to be enabled, then went to the official fontconfig homepage to get an idea what it does, then found the Archwiki page about fonts (https://wiki.archlinux.org/title/font_configuration) that explains some of the more unclear xml snippets (they usually don't contain information about what they are for, though some have quite interesting comments).

In the end I guess I have to try all the options, e.g. the sub-pixel related things. They are all disabled by default, but probably everyone has some sort of LCD.

I have some files with Japanese characters in the filename and after installing and enabling the noto-cjk font (which took quite some time to download) I saw that it was immediately used and the tofu characters were gone. So I see what fontconfig does.

One question I have now is that a couple of packages require font packages that are not enabled. For example, media-fonts/urw-fonts is required by app-text/ghostscript-gpl, but the fonts are unused:

Code:
  [40]  61-urw-bookman.conf
  [41]  61-urw-c059.conf
  [42]  61-urw-d050000l.conf
  [43]  61-urw-fallback-backwards.conf
  [44]  61-urw-fallback-generics.conf
  [45]  61-urw-fallback-specifics.conf
  [46]  61-urw-gothic.conf
  [47]  61-urw-nimbus-mono-ps.conf
  [48]  61-urw-nimbus-roman.conf
  [49]  61-urw-nimbus-sans.conf
  [50]  61-urw-p052.conf
  [51]  61-urw-standard-symbols-ps.conf
  [52]  61-urw-z003.conf


Same with the dejavu fonts, except they are required by cups, vlc, pygments, fontconfig and libXft.

So, is this junk I don't really need? I can't decide what these fonts are for - I mean I googled around and found the URW wikipedia entry and saw they create fonts, the whole history, but it tells me nothing practical. Googling further, e.g. about URW Gothic I see a description like
Quote:
"URW Gothic L is a version of ITC Avant Garde Gothic with identical metrics, intended for use as a replacement in the PostScript Base 35 fonts for the Ghostscript program. The font has since been released under free and open source terms."
And from here I guess I am supposed to google what PostScript Base 35 is and so on and so on, only understand that it is some font that is still not used by the system but installed anyways.

Now in the Fontconfig wiki page I see a small list of recommendations - but in the end I guess there is no comparison for the use-cases, included fonts and their role, history, license etc, right?

To decide between liberation and croscore I found this reddit page: https://www.reddit.com/r/typography/comments/lqgsgt/liberation_or_croscore_fonts/, so I guess I should drop liberation fonts as croscore contains further development (also Liberation does not include a lot of fonts, e.g. no Calibri style font). But in addition there is noto ...

And there was a similar discussion on reddit 10 years ago:
https://www.reddit.com/r/archlinux/comments/2l2cr7/what_fonts_do_you_install_for_most_coverage_with/
That also brought up the thought that some webpages include fonts like open-sans that my browser probably would download all the time because I don't have this font on my system...

I don't know where to stop, I don't know where to start, I don't get structure in this mess, everywhere is just a cluster of stuff.

Also one thing: TTF vs OTF - I checked that as well and saw that OTF is a further development, but it looks like only LaTeX uses OTF and the rest of the system uses TTF. Kind of weird that after 20 years almost nobody uses it on IT systems.

Also also: I found that fontforge USE-flag on liberation-fonts, dejavu and freetype, checked what it does... if I understand correctly setting that "compiles the font from its source code", to use an analogy, instead of using the "already compiled" font. Why would someone want to do that even, the font has a certain definition, so the result is the result is the result, right?

That whole fonts topic blows my mind.
Back to top
View user's profile Send private message
tckosvic
n00b
n00b


Joined: 18 Apr 2023
Posts: 67

PostPosted: Tue Mar 12, 2024 6:37 pm    Post subject: Reply with quote

To me the important thing about a font is clarity. For example, does the font allow you to distinguish between I (cap i), l ( lower case ell), and 1 (number 1). Also can you distinguish between O (cap o) and 0 (number zero) in the font. I saw an extensive video by Distro Tube a few years ago where he went through a dozen or so font families to highlight their ability to distinguish between these characters. I tried to find the source for this to give as a reference but I was unable to find it. I will post that when I come across it.

tom kosvic
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 324
Location: Naarm/Melbourne, Australia

PostPosted: Thu Mar 14, 2024 7:11 am    Post subject: Reply with quote

So, what i've ended up doing is creating a "Fonts/Background" page on the wiki, and linked to it from the "Fonts" page. It's basically a braindump of stuff off the top of my head, so i'm sure there's room for improvement (and there are probably various typos etc.).

@mx_:
With that done, i'll try to come back soon to answer some more of your questions by expanding the wiki page (unless some else answers here or there first).
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1537

PostPosted: Thu Mar 14, 2024 8:01 am    Post subject: Re: Font cleanup / organisation Reply with quote

mx_ wrote:
In the end I guess I have to try all the options, e.g. the sub-pixel related things. They are all disabled by default, but probably everyone has some sort of LCD.


What do you mean by subpixel related parts? Subpixels are aligned horizontally or vertically and arranged by color, what matters is the alignment and arrangement. There are pictures online which, just by looking at them can tell you what alignment and arrangement your display has.

mx_ wrote:
I have some files with Japanese characters in the filename and after installing and enabling the noto-cjk font (which took quite some time to download) I saw that it was immediately used and the tofu characters were gone. So I see what fontconfig does.

One question I have now is that a couple of packages require font packages that are not enabled. For example, media-fonts/urw-fonts is required by app-text/ghostscript-gpl, but the fonts are unused:

Code:
  [40]  61-urw-bookman.conf
  [41]  61-urw-c059.conf
  [42]  61-urw-d050000l.conf
  [43]  61-urw-fallback-backwards.conf
  [44]  61-urw-fallback-generics.conf
  [45]  61-urw-fallback-specifics.conf
  [46]  61-urw-gothic.conf
  [47]  61-urw-nimbus-mono-ps.conf
  [48]  61-urw-nimbus-roman.conf
  [49]  61-urw-nimbus-sans.conf
  [50]  61-urw-p052.conf
  [51]  61-urw-standard-symbols-ps.conf
  [52]  61-urw-z003.conf


Same with the dejavu fonts, except they are required by cups, vlc, pygments, fontconfig and libXft.

So, is this junk I don't really need? I can't decide what these fonts are for - I mean I googled around and found the URW wikipedia entry and saw they create fonts, the whole history, but it tells me nothing practical. Googling further, e.g. about URW Gothic I see a description like

Quote:
"URW Gothic L is a version of ITC Avant Garde Gothic with identical metrics, intended for use as a replacement in the PostScript Base 35 fonts for the Ghostscript program. The font has since been released under free and open source terms."


And from here I guess I am supposed to google what PostScript Base 35 is and so on and so on, only understand that it is some font that is still not used by the system but installed anyways.


Those are font configurations. The way I understand it is what's written in the Fonts page:

Fonts page wrote:
Once installed, Noto Emoji can be configured selected for use as a fallback font (used when a glyph does not exist in the selected font) for emoji symbols using the following command:
Code:
root #eselect fontconfig enable 75-noto-emoji-fallback.conf

Web browsers tend to use their own font selection logic, simply installing the package is enough.


So what you're configuring here is fallback for hen the glyph is missing from the font currently in use.

mx_ wrote:
Now in the Fontconfig wiki page I see a small list of recommendations - but in the end I guess there is no comparison for the use-cases, included fonts and their role, history, license etc, right?

To decide between liberation and croscore I found this reddit page: https://www.reddit.com/r/typography/comments/lqgsgt/liberation_or_croscore_fonts/, so I guess I should drop liberation fonts as croscore contains further development (also Liberation does not include a lot of fonts, e.g. no Calibri style font). But in addition there is noto ...

And there was a similar discussion on reddit 10 years ago:
https://www.reddit.com/r/archlinux/comments/2l2cr7/what_fonts_do_you_install_for_most_coverage_with/
That also brought up the thought that some webpages include fonts like open-sans that my browser probably would download all the time because I don't have this font on my system...

I don't know where to stop, I don't know where to start, I don't get structure in this mess, everywhere is just a cluster of stuff.


Well... as you've said, this is for people who care. It looks like you only think you care, but you don't. If you cared you would know what font is used for what et.c. I guess those are the people who deal with typography, pre-print preparation et.c. and they know what font is for what purpose and how to use it and so on.

I for example cared back when I used a 1280x1024 2007 monitor. Now that I have a laptop with 2k(I guess?) 2560x1600 16'' display, things are way more smooth and I don't care that much.

Also Gnome has its own settings in gnome tweaks. There you can set the hinting, alignment and so on. Then you can select fonts you like how they look for different applications/purposes and so on. Chrome/Chromium/Firefox have their own font rendering settings as well.

mx_ wrote:
Also one thing: TTF vs OTF - I checked that as well and saw that OTF is a further development, but it looks like only LaTeX uses OTF and the rest of the system uses TTF. Kind of weird that after 20 years almost nobody uses it on IT systems.

Also also: I found that fontforge USE-flag on liberation-fonts, dejavu and freetype, checked what it does... if I understand correctly setting that "compiles the font from its source code", to use an analogy, instead of using the "already compiled" font. Why would someone want to do that even, the font has a certain definition, so the result is the result is the result, right?

That whole fonts topic blows my mind.


In general some things you need and they are not in the packages with "further development" and some things you need further developed, so you can't choose on one thing or another. It depends on the case.

Best Regards,
Georgi
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 324
Location: Naarm/Melbourne, Australia

PostPosted: Thu Mar 14, 2024 12:44 pm    Post subject: Reply with quote

To now add to what logrusx wrote:

* If the fonts provided the `urw-fonts` package aren't enabled, you won't necessarily see any effects until something on your system makes use of the functionality of the `ghostscript-gpl` package, e.g. perhaps when printing or saving to PDF, when the 35 PostScript level 2 fonts are expected to be available. 'Ghostscript' is software to enable printing to the many printers that don't include a PostScript implementation in the hardware/firmware. The situation is similar with regards to the DejaVu fonts, which are intended to provide glyphs for a wide range of Unicode code points: until you do something that expects those fonts to be available, you're less likely to have any issues with them being disabled.

* Regarding TTF vs OTF: i'm not immediately aware of any software that can handle TTF fonts but can't handle OTF fonts. i have quite a collection of OTF fonts on my system, which i've built up over the years, and i'm yet to notice any issues using them in e.g. Scribus or LibreOffice.

* Being able to 'compile' fonts from source allows one to make small tweaks to the font, in the same way that one can patch a program to make a small change in its behaviour. i use a locally tweaked version of Inconsolata, which slightly changes the '0' (zero) glyph to include a dot in its center, to make it more visually distinguishable from a capital letter O.
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