Bug 114140 - [ODF] Improve the font-face for embedded fonts included in the file
Summary: [ODF] Improve the font-face for embedded fonts included in the file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: ODF-export-invalid Fonts-Embedded
  Show dependency treegraph
 
Reported: 2017-11-29 15:20 UTC by Regina Henschel
Modified: 2023-12-07 03:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
File generated by LibreOffice with embedded fonts (2.94 MB, application/vnd.oasis.opendocument.text)
2017-11-29 15:20 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-11-29 15:20:46 UTC
Created attachment 138068 [details]
File generated by LibreOffice with embedded fonts

For describing and embedding this structure is used e.g. (see attached file)
<office:font-face-decls>
  <style:font-face style:name="Cambria" svg:font-family="Cambria" style:font-family-generic="roman">
    <svg:font-face-src>
      <svg:font-face-uri xlink:href="Fonts/font3.ttf" xlink:type="simple">
        <svg:font-face-format svg:string="truetype"/>
      </svg:font-face-uri>
      <svg:font-face-uri xlink:href="Fonts/font4.ttf" xlink:type="simple">
        <svg:font-face-format svg:string="truetype"/>
      </svg:font-face-uri>
      <svg:font-face-uri xlink:href="Fonts/font5.ttf" xlink:type="simple">
        <svg:font-face-format svg:string="truetype"/>
      </svg:font-face-uri>
      <svg:font-face-uri xlink:href="Fonts/font6.ttf" xlink:type="simple">
        <svg:font-face-format svg:string="truetype"/>
      </svg:font-face-uri>
    </svg:font-face-src>
  </style:font-face>
</office:font-face-decls>

The files font3.ttf to font6.ttf contain the different font faces regular, bold, italic and bold-italic.

The ODF schema allows several <svg:font-face-uri> child elements for a <svg:font-face-src> element. The purpose of that feature is, that you can include different formats of the same font, e.g. "truetype" or "opentype" or "type-1". The format itself is then given in the <svg:font-face-format> element.

This feature is miss-used here to include different fonts into one <svg:font-face-src> element.

Problems with that:

The font descriptor attributes of the <style:font-face> element would allow a very detailed description of the font, but that is here not possible, because different fonts are in included. Consumers will not directly know, which font is to be used for e.g. italic.

At the time the file is written LibreOffice knows the font characteristics. But it does not save this information. So when opening the file, LibreOffice has to do again a detection in the font files themselves to recreate this information. That is avoidable effort.

Solution is to use for each font file its own <style:font-face> declaration.
Comment 1 Kevin Suo 2017-12-01 12:40:42 UTC
Added keyword implementationError.
Comment 2 Kevin Suo 2017-12-01 12:47:05 UTC
Changed Summary to reflect the description. Please correct me if  I Did it wrong.
Comment 3 QA Administrators 2018-12-04 03:48:20 UTC Comment hidden (obsolete)
Comment 4 Regina Henschel 2018-12-04 13:22:10 UTC
It has become worse. Now attributes loext:font-style and loext:font-weight exist as attributes of svg:font-face-uri. The correct solution would be svg:font-style and svg:font-weight as attributes of style:font-face.

Tested with Version: 6.3.0.0.alpha0+ (x64)
Build ID: d71ea82055a6a304493c7eaa90809a348e23784d
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-19_04:56:18
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 5 QA Administrators 2019-12-05 04:26:25 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2019-12-06 11:44:58 UTC
The problem still exists in Version: 6.5.0.0.alpha0+ (x64)
Build ID: 800b6f095f95ccfb8a7ba9755292332bf97f97ad
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 7 QA Administrators 2021-12-06 04:04:58 UTC Comment hidden (obsolete)
Comment 8 Regina Henschel 2021-12-06 14:13:04 UTC
The error still exists in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: de-DE
Calc: CL
Comment 9 QA Administrators 2023-12-07 03:17:54 UTC
Dear Regina Henschel,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug