Offering fonts relevant to the user's chosen language - following UX/design meeting 2024-Sep-25
Caolán McNamara
caolan.mcnamara at collabora.com
Thu Sep 26 10:46:08 UTC 2024
On Thu, 2024-09-26 at 00:28 +0300, Eyal Rozenberg wrote:
> In LibreOffice, we currently partition typefaces, like languages,
> into three language-groups: Western, RTL-CTL, and CJK
These categories of RTL+CTL/Complex and CJK/EastAsian are baked into
the odf and open xml file formats, so whatever about how they are
presented in the UI the categorization itself at an internal level is
probably unavoidable.
> Doing this is not just a UI challenge; it also involves a bit of a
> technical challenge: We will have some not-entirely-trivial
> heuristics for deciding whether a typeface passes muster as
> "covering" a written language, or not.
FWIW with fontconfig, you can see its estimate of language cover, e.g.
$ fc-list -v "Carlito"
...
lang: ... |ha|haw|ho| ...
...
while for
$ fc-list -v "David Libre"
...
lang: ... |ha|he|ho| ...
...
Which is presumably derived from the glyph coverage of the font.
There are some existing efforts in svtools/source/misc/sampletext.cxx
for determining script coverage for a font for the purposes of
generating a relevant preview string.
More information about the LibreOffice
mailing list