Monday, 10 July 2023

Idea: Let selection of default fonts be based on Noto

Hi all,

I would like to make an overhaul of the selection of fonts we ship by
default in the Ubuntu desktop. In short I would like to:

1. Install the fonts-noto-core package by default

- That package includes sans-serif and serif fonts covering latin as
well as a large number of non-latin scripts.

2. Keep installing the fonts-noto-cjk package by default

- To cover Chinese, Japanese and Korean.

3. Drop quite a few font packages for non-latin scripts from the seed

- Simply because those scripts would be covered by fonts-noto-core,
which typically offers fonts of better quality than the non-latin fonts
from various sources we currently include by default.

4. Keep DejaVu Sans Mono as the default monospace font for most scripts
for now.

- The quality of the DejaVu monospace fonts seems to be generally good.
No urgent need to change it for monospace.

(Please note that I'm not suggesting that we would replace the Ubuntu
font in the desktop environment. I'm talking about the default font
picked by fontconfig in other contexts, not least web browsing.)


What would the point with this be?
----------------------------------

Currently the DejaVu fonts are default for most scripts. Glyphs for a
large number of scripts are bundled into the same DejaVu font. Example:

$ fc-query /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf | grep -E
'\blang'
lang:
aa|ab|af|ar|ast|av|ay|az-az|az-ir|ba|bm|be|bg|bi|bin|br|bs|bua|ca|ce|ch|chm|co|cs|cu|cv|cy|da|de|el|en|eo|es|et|eu|fa|fi|fj|fo|fr|ff|fur|fy|ga|gd|gl|gn|gv|ha|haw|he|ho|hr|hu|hy|ia|ig|id|ie|ik|io|is|it|iu|ka|kaa|ki|kk|kl|ku-am|ku-ir|kum|kv|kw|ky|la|lb|lez|ln|lo|lt|lv|mg|mh|mi|mk|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|sah|sco|se|sel|sh|shs|sk|sl|sm|sma|smj|smn|sms|so|sq|sr|ss|st|sv|sw|tg|tk|tl|tn|to|tr|ts|tt|tw|tyv|ug|uk|uz|ve|vi|vo|vot|wa|wen|wo|xh|yap|yi|yo|zu|ak|an|ber-dz|ber-ma|crh|csb|ee|fat|fil|hsb|ht|hz|jv|kab|kj|kr|ku-iq|ku-tr|kwm|lg|li|mn-mn|ms|na|ng|nv|ota|pap-an|pap-aw|qu|quz|rn|rw|sc|sd|sg|sn|su|ty|za(s)

While you can argue that this is convenient, it makes it cumbersome to
replace the default font for a particular script with some better
default font.
/usr/share/fontconfig/conf.avail/56-language-selector-ar.conf is a
convoluted way to do that for Arabic, but that works only under an
Arabic locale. And many Arabic speaking users prefer to use English as
display language.

Changing the default font for sans-serif and serif to Noto for most
scripts would improve the situation in two ways:

1. Typically it would improve the font quality for non-latin scripts. As
regards latin I think the quality of the Noto font is well as good as
DejaVu.

2. To the extent we would want to provide non-Noto default fonts for a
few scripts, it would be easy to change the font configuration
accordingly, and we wouldn't need to restrict it to certain locales.

It's worth mentioning that e.g. Fedora and some of our own flavors
already use Noto fonts by default. Debian does so too if you install
e.g. the GNOME desktop on Debian, since fonts-noto-core is pulled in
that case and fontconfig upstream prefers Noto nowadays.


User complaints about too many fonts
------------------------------------

There is a discourse topic where some users complain about the large
number of fonts currently installed by default. Would this change make
those users happy? I'd say 'yes' and 'no'.

https://discourse.ubuntu.com/t/excessive-fonts-installed-by-default/20924

I can understand that users who create advanced documents and often need
to switch between only a few fonts don't like the idea with fonts
covering a lot of scripts around the world. Apparently the tools for
selecting fonts typically show the whole list of installed fonts. So
would the proposed change reduce the total number of fonts installed by
default? Probably not. I think there would be more of them.

But the good news is that the proposed change would make it much easier
for such users to uninstall one or two font packages:

sudo apt purge fonts-noto-core

(I'm assuming that the ubuntu-desktop package would only recommend
fonts-noto-core, not depend on it.)

That would leave a significantly smaller number of fonts, where DejaVu
would return as the default font for most scripts, and make life easier
for advanced content creators.


So how to go about this?
------------------------

I'm seeking a green light for starting the changes described above in
mantic.

As regards the font configuration, the snaps do (or will soon do) that
separately, and do not parse the system host's /etc/fonts/conf.d . So we
would need to start with the system, and once there is a decent set of
fonts including related font configuration, we would need to copy that
into the snaps later.


Looking forward to your response on the proposed changes.

--
Cheers,

Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel