Activity log for bug #1921793

Date Who What changed Old value New value Message
2021-03-29 22:13:33 Colin bug added bug
2021-03-29 22:13:33 Colin attachment added Embedded PS and TT OpenType fonts .docx https://bugs.launchpad.net/bugs/1921793/+attachment/5482192/+files/Embedded%20PS%20and%20TT%20OpenType%20fonts%20.docx
2021-03-29 22:15:06 Colin summary Embedded OpenType TT fonts - Word adds spaces to font name, need Calibre them for full compatibility Conversion Problem: Embedded OpenType TT fonts in DOCX files
2021-03-30 02:18:43 Colin description This is really to address what appears to be a Word bug or odd design choice (generates font file names based on font family and style names and not using the font file name, which means users have no control over the embedded font file names), but not something MS is likely to fix anytime soon. As part of the conversion process from DOCX to EPUB/AZW3, please convert the font names to exclude spaces in the final names. Convert the spaces to underscores. If there is a reason to avoid doing this, then please provide this as a new conversion option with DOCX input. Confirmed in Calibre 5.14 on Windows 10 H2 (Build 19042.867) on a DOCX generated by Word 16.0.13801.20288. When embedding OpenType Layout fonts with TrueType outlines in a Word DOCX file and then converting in Calibre, and performing the Edit Book -> Run Check test, it will report font problems due to the spaces in the filenames. This does not happen with OpenType fonts with PostScript outlines, but only because they are not embeddable. Here's an example of the message in the Calibre editor when embedding Bookman Old Style: The filename fonts/Bookman Old Style - Regular.ttf contains unsafe characters, that must be escaped, like this fonts/Bookman%20Old%20Style%20-%20Regular.ttf. This can cause problems with some e-book readers. To be absolutely safe, use only the English alphabet [a-z], the numbers [0-9], underscores and hyphens in your file names. While many other characters are allowed, they may cause problems with some software. The automated fix in the Book Editor works perfectly, so we know that Calibre already has the full capability to address these proactively at time of conversion: E.g., The link that says, "rename the file fonts/Avrile Sans - Regular.ttf to fonts/Avrile_Sans_-_Regular.ttf." With embedded fonts this is needed 100% of the time, so please make this the default behavior or add as an option on the DOCX input tab of the conversion window. PROBLEM (100% consistent and reproducible) When embedding OpenType Layout fonts with TrueType outlines in a Word DOCX file and then converting to EPUB in Calibre, and performing the Edit Book -> Run Check test, it will report font problems due to the spaces in the filenames. Here's an example of the message in the Calibre editor when embedding Bookman Old Style: "The filename fonts/Bookman Old Style - Regular.ttf contains unsafe characters, that must be escaped, like this fonts/Bookman%20Old%20Style%20-%20Regular.ttf. This can cause problems with some e-book readers. To be absolutely safe, use only the English alphabet [a-z], the numbers [0-9], underscores and hyphens in your file names. While many other characters are allowed, they may cause problems with some software." This does not happen with OpenType fonts with PostScript outlines, but only because they are not embeddable. VERSIONS Confirmed in Calibre 5.14 on Windows 10 H2 (Build 19042.867) on a DOCX generated by Word 16.0.13801.20288. AVAILABLE WORKAROUND The automated fix in the Book Editor works perfectly every time, so we know that Calibre already has the full capability to address these proactively at time of conversion: E.g., The link that says, "rename the file fonts/Avrile Sans - Regular.ttf to fonts/Avrile_Sans_-_Regular.ttf." SUGGESTED FIX/SOLUTION As part of the conversion process from DOCX to EPUB/AZW3, please convert the font names to exclude spaces in the final names. Convert the spaces to underscores. If there is a reason to avoid doing this, then please provide this as a new conversion option on the DOCX input tab of the Conversion window. ADDITIONAL BACKGROUND AND DETAILS This emerges from what is really more of a Word bug or odd design choice (generates font file names based on font family and style names and not using the font file name, which means users have no control over the embedded font file names), but not something MS is likely to fix anytime soon. Therefore, while the problem is with the DOCX file generation by Word, the only way to fix this lies with Calibre.
2021-03-30 03:21:18 Kovid Goyal calibre: status New Won't Fix
2021-04-02 08:27:21 Kovid Goyal calibre: status Won't Fix Fix Released