Many thanks for your swift and detailed reply. Indeed , we have a custom addon for FOP, embedding the DejaVu font sets in order to render the mathematical formulas. That explains why it works with PDF...
We'll do as you suggest to fix the issue for DocX, it's not critical. Many thanks again, Philippe. Philippe Nobili Subsurface Imaging - Product Engineering Tel: +33 16447 4090 | Mobile: +33 63756 6441 CGG, 27 avenue Carnot Massy, 91341 - France http://www.cgg.com Please consider the environment before printing. -----Original Message----- From: Hussein Shafie [mailto:[email protected]] Sent: Tuesday, September 05, 2017 7:39 PM To: nobili, philippe Cc: '[email protected]' Subject: Re: [XXE] Missing fonts in converted *.docx documents On 09/05/2017 05:45 PM, nobili, philippe wrote: > > We recently realized that when converting DocBook documents into > *.docx from XMLMind, some fonts are missing in the output file and > replaced by squares (we use the Open Office XML converter available from > XMLMind). > The same document converts fine into PDF. > I managed to reproduce the issue you describe here when generating DOCX *and* PDF. I mean, unless you configured FOP fonts, PDF has the problem too. > > > Is there a way to fix this problem on our side and embed the needed > fonts when generating the *.docx file ? > Sure, but this does not work by embedding fonts in the DOCX file. You simply have to remap the "serif" generic font family to a font family having all the characters you are using. By default, serif (which is the font family specified in the DocBook XSL stylesheet) is mapped "Times New Roman" when you generate RTF, WML and DOCX. "Times New Roman" indeed does not have character U+2243 ('ASYMPTOTICALLY EQUAL TO'). In fact very few fonts have this character, while a lot of fonts have U+2248 ('ALMOST EQUAL TO'), which is probably what your author wanted to write. For example, font "Cambria Math" (not plain "Cambria") has U+2243, so you must add these parameters to your customize.xxe or to your .xxe files (part of your add-on): --- <parameterGroup name="docb.toRTF.XFCParameters"> <parameter name="genericFontFamilies">serif=Cambria Math,sans-serif=Arial,monospace=Courier New</parameter> </parameterGroup> <parameterGroup name="db5.toRTF.XFCParameters"> <parameterGroup name="docb.toRTF.XFCParameters"/> </parameterGroup> <parameterGroup name="db51.toRTF.XFCParameters"> <parameterGroup name="docb.toRTF.XFCParameters"/> </parameterGroup> --- However, in my opinion, it's simpler to keep the default font mapping and just tell your author to replace U+2243 by U+2248. This email and any accompanying attachments are confidential. If you received this email by mistake, please delete it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

