using external font files from Windows in PDF Chemistry

chrispitude
Posts: 174
Joined: Thu May 02, 2019 2:32 pm

using external font files from Windows in PDF Chemistry

Post by chrispitude » Thu Dec 05, 2019 6:16 pm

We use Microsoft Visio in a Windows 10 environment to create SVG figures. Thus, the SVG files contain references to the "Arial" and "Courier New" font families. When we use PDF Chemistry in a linux environment to publish our books, these fonts are not resolved and instead fall back to Times.

Although this happens for CSS-styled DITA content (like topic text), this is not a problem because we can specify multiple font families in the CSS used for publishing.

However, the SVG files are more problematic. We have no control over what Visio writes into the SVG file, plus we have thousands of legacy SVG files in our books. Following the PDF Chemistry documentation on using local font files at

https://www.oxygenxml.com/doc/versions/ ... files.html

I copied the pertinent Windows fonts to our PDF Chemistry installation in linux:

Code: Select all

% ls -l /u/doc/syncrosoft/oxygen-publishing-engine-3.x/plugins/com.oxygenxml.pdf.css/lib/oxygen-pdf-chemistry/config/fonts
total 9400
 964 -rw-rw-rw- 1 doc src  980756 Dec  5 06:59 arialbd.ttf
 712 -rw-rw-rw- 1 doc src  721144 Dec  5 06:59 arialbi.ttf
 708 -rw-rw-rw- 1 doc src  717428 Dec  5 06:59 ariali.ttf
 180 -rw-rw-rw- 1 doc src  180084 Dec  5 06:59 ARIALNBI.TTF
 184 -rw-rw-rw- 1 doc src  180740 Dec  5 06:59 ARIALNB.TTF
 184 -rw-rw-rw- 1 doc src  181124 Dec  5 06:59 ARIALNI.TTF
 176 -rw-rw-rw- 1 doc src  175956 Dec  5 06:59 ARIALN.TTF
1020 -rw-rw-rw- 1 doc src 1036584 Dec  5 06:59 arial.ttf
 168 -rw-rw-rw- 1 doc src  167592 Dec  5 06:59 ariblk.ttf
 792 -rw-rw-rw- 1 doc src  805244 Dec  5 06:59 courbd.ttf
 568 -rw-rw-rw- 1 doc src  577488 Dec  5 06:59 courbi.ttf
 656 -rw-rw-rw- 1 doc src  667440 Dec  5 06:59 couri.ttf
 792 -rw-rw-rw- 1 doc src  806504 Dec  5 06:59 cour.ttf
However, PDF Chemistry is still not picking up these fonts and I am getting fallback fonts. Am I misunderstanding what the documentation is telling me to do?

Dan
Posts: 447
Joined: Mon Feb 03, 2003 10:56 am

Re: using external font files from Windows in PDF Chemistry

Post by Dan » Mon Dec 09, 2019 2:27 pm

This is a bug. It will be fixed in the next version (22). As a workaround, you can create a "config/fonts" directory in the working directory of the transformation process, and place the fonts there.

Thank you for reporting the problem!
Many regards,
Dan

Post Reply