Naming of installed variable-weight fonts
I have an issue when I use Gnome Fonts to install the 'Public Sans' font from Google, https://fonts.google.com/specimen/Public+Sans#standard-styles
When I install this font, fc-list gives me:
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraLight Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Black
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin Italic,Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraBold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Bold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin,Regular
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Bold Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Regular
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=SemiBold
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Medium
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Light
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraBold Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Light Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Medium Italic
/home/john/.local/share/fonts/PublicSans-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=ExtraLight
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Black Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Thin Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=SemiBold Italic
/home/john/.local/share/fonts/PublicSans-Italic-VariableFont_wght.ttf: Public Sans,Public Sans Thin:style=Italic
note that the name Public Sans Thin
is repeated for all variants. I don't know much about this stuff, but it would appear that this in turn leads to this font being listed as Public Sans Thin
in LibreOffice, instead of Public Sans
. This in turn results in incorrect behaviour when attempting to work with documents shared from Windows people, since all weights are available/visible if I choose the font Public Sans Thin
, but only the Bold, Italic and BoldItalic options are available if I manually type in the font Public Sans
. It seems that font substition does not extend to variable weight fonts, somehow.
Is this an error in Gnome Fonts, or in freetype?
This was on Ubuntu 18.04, with libfreetype 2.8.1-2ubuntu2.1 and Gnome Font Viewer 3.28.0-1.
Can you suggest a workaround?
I also posted a comment in Gnome gitlab: https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/issues/22#note_1187385