Bug 145967 - An infobar should notify user that some embedded fonts couldn't be used because of license restrictions
Summary: An infobar should notify user that some embedded fonts couldn't be used becau...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0, inReleaseNotes:26.2
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Infobar Fonts-Embedded
  Show dependency treegraph
 
Reported: 2021-11-30 13:17 UTC by Mike Kaganski
Modified: 2025-08-15 17:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Embedded Bebas Neue font (2010), restricted (916.54 KB, application/vnd.oasis.opendocument.text)
2021-11-30 13:17 UTC, Mike Kaganski
Details
Embedded Bebas Neue font (2018), unrestricted (924.74 KB, application/vnd.oasis.opendocument.text)
2021-11-30 13:19 UTC, Mike Kaganski
Details
How original document renders on a system without the font (37.18 KB, image/png)
2021-11-30 13:20 UTC, Mike Kaganski
Details
How modified document renders on a system without the font (36.53 KB, image/png)
2021-11-30 13:20 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-11-30 13:17:35 UTC
Created attachment 176595 [details]
Embedded Bebas Neue font (2010), restricted

This issue is based on a today's real-life question on IRC, started with:

> Guest88: Hi! I have a question about embeding fonts. ODT and OTT files with
>          fonts don't show up on machine without this fonts.
> Guest88: any idea whats wrong ?

The sample file that the user provided (see attachment) contained embedded fonts, including Bebas Neue; however, on my system (where this font was absent), the file didn't use the embedded font for text rendering.

The issue was that the embedded font had restricted licensing rights, that got detected in EmbeddedFontsHelper::sufficientTTFRights, and loading the file was (rightfully) rejected.

However, there's no way for user to know that. It looks as if LibreOffice doesn't work correctly.

The proposal is to implement an infobar, that would tell something like "some fonts embedded in the document couldn't be loaded due to restricted licensing rights".
Comment 1 Mike Kaganski 2021-11-30 13:19:19 UTC
Created attachment 176596 [details]
Embedded Bebas Neue font (2018), unrestricted

This is a modified copy of the previous attachment, with the old version of problematic font replaced with a newer version, that is unrestricted, and thus the document is rendered correctly.
Comment 2 Mike Kaganski 2021-11-30 13:20:20 UTC
Created attachment 176597 [details]
How original document renders on a system without the font
Comment 3 Mike Kaganski 2021-11-30 13:20:43 UTC
Created attachment 176598 [details]
How modified document renders on a system without the font
Comment 4 Heiko Tietze 2021-12-06 12:40:06 UTC
(In reply to Mike Kaganski from comment #0)
> The proposal is to implement an infobar, that would tell something like
> "some fonts embedded in the document couldn't be loaded due to restricted
> licensing rights".

Good idea, ideally with the option to load anyway. Guess this could be an interesting easyhack. Mike's code pointer is vcl/source/gdi/embeddedfontshelper.cxx in 153 if( !sufficientFontRights )... SAL_INFO().

For the infobar search for AppendInfoBar().
Comment 5 Buovjaga 2024-11-07 05:30:03 UTC
Unfinished patch: https://gerrit.libreoffice.org/c/core/+/130532

If it's of some use, you may add to the commit message

Co-authored-by: Name <email>
Comment 6 Commit Notification 2025-08-12 12:15:40 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fdd24dabb6f8c520e8307bacab2bd8b09ebc763d

tdf#145967: Initial support for docs with restricted embedded fonts

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Mike Kaganski 2025-08-12 12:20:20 UTC
I implemented a support for viewing the documents with restricted fonts; so this is now "fixed" by that, in a different way. The fact that there are some restricted fonts will be shown in a dialog.