On 1/17/24 18:27, Nelson, Robert wrote:
I have been trying to figure out how to embed certain fonts with
the DOCX format. We don’t want to embed the fonts that would typically
be available on a Windows PC however we also use some one-off fonts and
it’s obviously preferable to be able to embed those rather than expect
anyone who views the DOCX to have those fonts embedded.
Do you happen to have any suggestions on this?
Sorry but this feature is not supported by XMLmind XSL-FO Converter.
It would be technically possible to implement it but we have no demand
for such feature.
Besides, using this feature creates quite large DOCX files. For example,
- before checking option "Embed fonts in the file", the size of my test
DOCX file is 43Kb,
- after checking options "Embed fonts in the file" and "Do not embed
common system fonts", the size of my test DOCX file is 3198Kb.
Note that if you are really motivated, it may be possible to develop a
post processor tool embedding a number of fonts in the DOCX file
generated by XMLmind XSL-FO Converter.
This post processor tool would modify the DOCX file (which is a ZIP
file) as follows:
- create a fonts/ folder in the DOCX file;
- this fonts/ folder contains a number of obfuscated font files
(obfuscated TTF; very simple obfuscation);
- _rels/fontTable.xml.rels lists the font files found in folder fonts/;
- Embedded fonts are referenced in fontTable.xml by the means of
w:embedRegular, w:embedItalic, etc, elements.
More information in "Fundamentals And Markup Language Reference",
"WordprocessingML Reference Material", "Fonts", "Font Embedding",
https://ecma-international.org/wp-content/uploads/ECMA-376-1_5th_edition_december_2016.zip
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support