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".
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.
Created attachment 176597 [details] How original document renders on a system without the font
Created attachment 176598 [details] How modified document renders on a system without the font
(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().
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>
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.
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.