[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default font: Transition from DejaVu to Noto

On 2023-09-12 03:09, Jonas Smedegaard wrote:
Quoting Gioele Barabucci (2023-09-12 09:19:26)
On 12/09/23 08:24, Fabian Greffrath wrote:
Instead, even
the fonts-noto-core package installs a full pack of 268 (!) font files.
This is discussed in detail in #983291 [1].

The issues is not that there are too many files, but that these files
become extra entries in font pickers (1 entry for every ~3 files).

Why not collapse all these font files into a few new font files using
fontforge or a variant of nototools's merge_fonts.py?

For example Noto Serif {Ahom, Bengali, Devanagari, Malayalam, Tamil,
Thai, …} could be merged into "Noto Serif Asia". Then, Noto * {Africa,
America, Asia, Europe, Oceania, Symbols} could be shipped in the
fonts-noto-aggregated package and their entries added to Debian's
fontconfig as default fallbacks. This would greatly alleviate the
problem of having too many entries in the font pickers, yet provide the
same coverage of fonts-noto-core.

Please discuss that proposal with the Noto project upstream, not here.

My understanding (and I believe documented somewhere too, e.g. in the
Noto CJK subproject which is the most extreme in amount of glyphs) is
that it is technically impossible to join all glyphs due to limitations
of the font formats.

Indeed, font have a 64K limit on the number of glyphs. There is a proposal[1] to increase this limit, and it is being discussed [2].

Merging some (so not all, so the 64K limit is not reached) of the Noto fonts together might work. In addition to merging the sets of glyphs, you would also need to merge the OpenType layout data in the GSUB and GPOS tables.

And the tool[3] from Google looks like it might handle the GSUB/GPOS merging.

Different fonts (say for Devanagari and Arabic) might have different line spacing, a merged font would have to choose which line spacing to use. As a result, the line spacing in the font might be too loose, or it might be too tight, resulting in clipping and/or inter-line clashes depending on which script was being displayed. The source for the tool mentions this line spacing issue.

And yes, Noto provides separate fonts for (in this example) Arabic and Devanaragi) even though the top of the Noto website[4] says "Noto: A typeface for the world" (sort of implying one font) but further down the page it says "Noto is a collection of high-quality fonts" (plural)

I am curious about the comment above "1 entry for every ~3 files" In LibreOffice Writer (7.5.6) on my Ubuntu (22.04) system at least, installing a variable font results in fewer lines in a font picker that installing a bunch of static fonts.

[1] https://github.com/harfbuzz/boring-expansion-spec/blob/main/beyond-64k.md

[2] https://github.com/harfbuzz/boring-expansion-spec/issues/105

[3] https://github.com/notofonts/nototools/blob/main/nototools/merge_fonts.py

[4] https://fonts.google.com/noto

Bobby de Vos

Reply to: