Bug 118417 - Export OpenType tags as CSS property font-feature-settings with HTML or EPUB
Summary: Export OpenType tags as CSS property font-feature-settings with HTML or EPUB
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.0.5.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HTML-Export EPUB-Export
  Show dependency treegraph
 
Reported: 2018-06-27 15:40 UTC by RGB
Modified: 2018-07-14 06:00 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test files. Original ODT, plus exported EPUB and xhtml and "fixed" xhtml (11.00 KB, application/gzip)
2018-06-27 15:40 UTC, RGB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RGB 2018-06-27 15:40:11 UTC
Created attachment 143168 [details]
Test files. Original ODT, plus exported EPUB and xhtml and "fixed" xhtml

Let's suppose I build a document using Libertinus Serif as main font and that some portion of the text have an OpenType tag like "smcp" (small caps) applied. When exporting the document to xhtml or EPUB the corresponding css style gets as font name

font-family:Libertinus Serif:smcp;

which of course is not interpreted by the target program. I do not know that much of css, but I think the font name should translate as an style with something like

font-family:Libertinus Serif; font-feature-settings:"smcp" 1; 

In fact, if I manually "fix" the xhtml file by changing the line

.T1 { font-family:Libertinus Serif:smcp; }

into 

.T1 { font-family:Libertinus Serif; font-feature-settings:"smcp" 1; }

the small caps text works without problems on my browser.

This problem is particularly important when fonts are embedded on the document and the target renderer does not recognize the badly formatted font family, giving a replacement font instead. 

The attachment contains:

- original odt file
- exported EPUB file
- exported xhtml file
- "fixed" xhtml file

Everything tested on LibO 6.0.5.2