Bug 126936 - Writer: Embedded fonts not rendered correctly
Summary: Writer: Embedded fonts not rendered correctly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fonts-Embedded
  Show dependency treegraph
 
Reported: 2019-08-14 23:49 UTC by admin
Modified: 2022-02-04 13:28 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Bug 126936 sample document (3.81 MB, application/vnd.oasis.opendocument.text)
2019-09-18 23:01 UTC, admin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description admin 2019-08-14 23:49:30 UTC
Description:
Using the embed fonts in document option, the saved document size is much larger, so seems something is being embedded.  However, opening the document on another system without the fonts installed, the fonts are not rendered correctly at all (rendered in some Sans font).

Steps to Reproduce:
1. Create new document with some text using a specialized font that is not installed on the target system
2. Use File > Properties > Font > embed fonts in document
3. Save document and transfer to the target system without the specialized font

Actual Results:
The font that is not installed on the target system is rendered in some default Sans font

Expected Results:
Text should be rendered with the embedded fonts in the document


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 himajin100000 2019-08-24 17:57:52 UTC Comment hidden (obsolete)
Comment 2 himajin100000 2019-08-24 18:05:39 UTC Comment hidden (obsolete)
Comment 3 Xisco Faulí 2019-09-18 11:24:47 UTC Comment hidden (obsolete)
Comment 4 admin 2019-09-18 23:01:17 UTC
Created attachment 154273 [details]
Bug 126936 sample document
Comment 5 Dieter 2019-09-23 06:01:24 UTC
(In reply to himajin100000 from comment #1)
> Reproduced. I tested with Electroharmonix
> http://typodermicfonts.com/electroharmonix/

status NEW because of comment 1
Comment 6 himajin100000 2020-07-23 19:51:40 UTC
After a bit of further test, it became clear

the font I used, i.e. Electroharmonix , has FsType 0x0004.
and cannot be registered even as a temporary font. so, the previous comment of mine should be marked OBSOLETE.

https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/embeddedfontshelper.cxx?r=b1ca0e5a#150

Next, I used GD-HighwayGothicJA-TTF 
available from https://forest.watch.impress.co.jp/library/software/gdhighway/

Note: Ads are often fraudulent. Please be sure that the filename of the file you are downloading is GDHighwayGoJA-Rev108b-TTF.zip

I installed this font and used for both ascii(in case only the Latin fonts checkbox is checked) and Japanese text ( namely 三鷹, a Japanese city with a character in the second index that made me easy to tell if the font is actually used ), and saved to an odt file.

Then, I uninstalled the font and let my own dbgutil LibreOffice build load the file to get the log.

the message I got:
warn:vcl.fonts:1448:12084:vcl/win/gdi/salfont.cxx:1206: temp font was registered but is not in enumeration: file:///C:/build/instdir/program/../user/temp/embeddedfonts/fromdocs/GD-HighwayGothicJA-TTF5.ttf

produced at 
https://opengrok.libreoffice.org/xref/core/vcl/win/gdi/salfont.cxx?r=16ab4c5c&mo=39156&fi=1203#1203

probably after trying to register the font extracted to

https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/embeddedfontshelper.cxx?r=b1ca0e5a#163

Is the message I got related to the cause of this bug?
Comment 7 himajin100000 2020-07-24 13:29:51 UTC
minor typo
a character that made me easy to tell
->
a character that made it easy for me  to tell
Comment 8 Timur 2021-04-15 13:48:46 UTC
Feature unusable, that is major bug for me. Not single document problem.