Bug 167558 - Variable-weight fonts: case of Public Sans
Summary: Variable-weight fonts: case of Public Sans
Status: RESOLVED DUPLICATE of bug 35538
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fonts PPTX
  Show dependency treegraph
 
Reported: 2025-07-18 02:38 UTC by john
Modified: 2025-12-23 03:12 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
sample slide (PPTX format, modified text using LO) (563.25 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-07-18 02:39 UTC, john
Details
script that copies nameID 16 to nameID 1, gives desired behaviour for Public Sans in LO (2.47 KB, text/x-python)
2025-07-18 03:20 UTC, john
Details

Note You need to log in before you can comment on or make changes to this bug.
Description john 2025-07-18 02:38:01 UTC
Description:
My university uses Public Sans as its standard font, so it's important to figure out how to get it working properly in LO. It can be downloaded from here:
https://fonts.google.com/specimen/Public+Sans
It's a variable-weight font. I installed it by unpacking the zip and double-clicking the two variable-weight TTF files. This installs them somewhere (not sure where; it ta) and I can see them in the GNOME 'Fonts' program.

Next I open LO and I can see 'Public Sans Thin' in my font list, but not 'Public Sans'. From what I can tell, this is because LO uses the 'nameID="1"' from the font TTF (this can be extracted using 'ttx -t name fontfile.ttf' from fonttools). From what I can tell, LO should be using 'nameID="16"' instead for variable-weight fonts.

I've got no clear way to get the correct behaviour in LO with this font.

BTW see here for more context on this font:
https://matthewbutterick.com/chron/the-curious-case-of-public-sans.html


Steps to Reproduce:
As above.

Actual Results:
PPTX with 'Public Sans' and 'Public Sans Light' don't render correctly.
The installed font shows up in LO as 'Public Sans Thin' (corresponds to nameID="1" in the ttx name list).

Expected Results:
The installed Public Sans should be properly detected, with the proper Public Sans name.
Font substitution to 'Public Sans' should be applied in cases where the font is indicated as 'Public Sans Light'
I'll add a sample PPTX file (I replace the text with 'a' and 'g')


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4
Calc: threaded
Comment 1 john 2025-07-18 02:39:22 UTC
Created attachment 201856 [details]
sample slide (PPTX format, modified text using LO)
Comment 2 john 2025-07-18 03:20:28 UTC
Created attachment 201858 [details]
script that copies nameID 16 to nameID 1, gives desired behaviour for Public Sans in LO

attached script copies nameID 16 to nameID 1, gives desired behaviour for Public Sans in LO
Comment 3 Khaled Hosny 2025-12-22 14:23:47 UTC

*** This bug has been marked as a duplicate of bug 35538 ***
Comment 4 Eyal Rozenberg 2025-12-22 15:38:26 UTC
@Khaled: Are you sure we should mark this bug as a duplicate, when it is specifically about the rendering of a PPTX file? Regardless of how we handle fonts in the UI, we should still be arranging things so that PPTXes would render as intended?

@John: Can you please attach the unmodified PPTX which "doesn't render correctly", and - ignoring the naming of the typeface - explain _how_ it renders incorrectly? A screenshot would also be nice.