Page 1 of 1

Glyph":" (0xff1a, colonmonospace) not available in font " TimesNewRomanPS-ItalicMT".

Posted: Fri Apr 29, 2016 5:58 am
by Nikky_zhang
Hi,

I have got a warning message

Glyph":" (0xff1a, colonmonospace) not available in font " TimesNewRomanPS-ItalicMT".

while I am transforming from .dita to pdf by using DITA-OT 1.8.5

The conditions are :
1) All my .dita files are in Chinese, and the language is set to "zh-cn" in ditamap and topics.

2) the DITA-OT version is 1.8.5 and I am using the "*.pdf2" plugin.

My question is regarding to the font-mappings.xml which located in /fo/

The original text in this file is as below:

<logical-font name="Serif">
<physical-font char-set="defult">
<font-face>Times New Roman,Times, Arial Unicode US, Tahoma, Batang</font-face>
</physical-font>
<physical-font char-set="Simplified Chinese">
<font-face>Simsun, Arial Unicode US,Tahoma, Batang</font-face>
</physical-font>
......
</logical-font>

with this font-mappings.xml, I have got the warning above, and some # is shown in the PDF output.

But when I deleted the Times New Roman,Times, from the <font-face> line. Then every
thing is perfect. The warning is gone, and I have got what I want.

<logical-font name="Serif">
<physical-font char-set="defult">
<font-face>Arial Unicode US, Tahoma, Batang</font-face>
</physical-font>
<physical-font char-set="Simplified Chinese">
<font-face>Simsun, Arial Unicode US,Tahoma, Batang</font-face>
</physical-font>
......
</logical-font>

So my question is : I have set the Simsun in Simplified Chinese filed. Why does it still search the "default" setting part?

How the font-mappings.xml works?

Thanks

Nikky

Re: Glyph":" (0xff1a, colonmonospace) not available in font " TimesNewRomanPS-ItalicMT".

Posted: Fri Apr 29, 2016 12:12 pm
by radu_pisoi
Hi,

The PDF plugin allows you to identify special characters that the transformer might encounter in the DITA topics and associate those characters with fonts that implement them.

The folder cfg/fo/i18n contains a series of language-specific files that identify these special characters. Each character is assigned to a particular character set.

The font-mappings.xml file specifies a map between logical fonts and physical fonts for each character set.

So, in your case the problem is that the '0xff1a' character is not included in the 'Simplified Chinese' character set. You have to open the frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg/fo/i18n/en.xml file and add the &#xff1a; character to the 'Simplified Chinese' character set.

Code: Select all


...
<alphabet char-set="Simplified Chinese">
<character-set>
<character>&#xff1a;</character>
</character-set>
...

The second step is to open the DITA-OT/plugins/org.dita.pdf2/cfg/fo/font-mappings.xml file and add the SimSun font as a possible font for Simplified Chinese:

Code: Select all


...
<physical-font char-set="Simplified Chinese">
<font-face>AdobeSongStd-Light, Arial Unicode MS, SimSun, Batang</font-face>
</physical-font>
...