[xep-support] Re: Adding Japanese fonts

From: Kevin Brown <kevin_at_ADDRESS_REMOVED>
Date: Wed Jun 14 2017 - 15:18:49 PDT

Yes. The names you have set are:

KozMinProVI-Regular,ArialUnicodeMS,Batang

The name in your XEP.xml is "KozminPro"

They do not match. So RenderX is looking for a font named "KozMinProVI-Regular", then a font named "ArialUnicodeMS" then a font named "Batang" and if it finds none of those in your xep.xml (none of them exist), it uses Helvetica.

Kevin
-----Original Message-----
From: Mark Giffin [mailto:mgiffin@earthlink.net]
Sent: Wednesday, June 14, 2017 11:55 AM
To: kevin@renderx.com; RenderX Community Support List <xep-support@renderx.com>
Subject: Re: [xep-support] Re: Adding Japanese fonts

On 6/14/2017 10:37 AM, Kevin Brown wrote:
> Please post the whole fonts section.
> That error means it cannot find the font.
> Look up the parent elements for xml:base and see if you did not insert
> this fragment into another section where the xml:base sets the
> directory to something you do not expect.
Below is my full <fonts> section. By the way, my <languages> section does not include a <language name="Japanese" etc>, is that a problem?

The full path to xep.xml is C:\Program Files\RenderX\XEP\xep.xml.
xml:base seems to be set correctly on <fonts>.

The DITA OT is looking for "KozMinProVI-Regular" and my font-group strings do not match that exactly. Could that be a problem?

<fonts xmlns="http://www.renderx.com/XEP/config"
          xml:base="fonts/"
          default-family="Helvetica">

         <!-- Japanese open type font. -->
     <font-group label="Japanese Open Type" embed="true">
       <font-family name="KozminPro">
         <font><font-data otf="KozMinPr6N-Regular.otf"/></font>
         <font style="italic"><font-data otf="KozMinPr6N-Regular.otf"/></font>
         <font weight="bold"><font-data otf="KozGoPr6N-Medium.otf"/></font>
         <font weight="bold" style="italic"><font-data otf="KozGoPr6N-Medium.otf"/></font>
       </font-family>
     </font-group>

     <!-- Base Adobe fonts. -->
     <font-group label="Base 14" embed="false" subset="false"
initial-encoding="standard">
       <font-family name="Courier">
         <font><font-data afm="Courier.afm"/></font>
         <font style="oblique"><font-data afm="Courier-Oblique.afm"/></font>
         <font weight="bold"><font-data afm="Courier-Bold.afm"/></font>
         <font weight="bold" style="oblique"><font-data afm="Courier-BoldOblique.afm"/></font>
       </font-family>

       <font-family name="Helvetica">
         <font><font-data afm="Helvetica.afm"/></font>
         <font style="oblique"><font-data afm="Helvetica-Oblique.afm"/></font>
         <font weight="bold"><font-data afm="Helvetica-Bold.afm"/></font>
         <font weight="bold" style="oblique"><font-data afm="Helvetica-BoldOblique.afm"/></font>
       </font-family>

       <font-family name="Times" ligatures="&#xFB01; &#xFB02;">
         <font><font-data afm="Times-Roman.afm"/></font>
         <font style="italic"><font-data afm="Times-Italic.afm"/></font>
         <font weight="bold"><font-data afm="Times-Bold.afm"/></font>
         <font weight="bold" style="italic"><font-data afm="Times-BoldItalic.afm"/></font>
       </font-family>

       <font-family name="Symbol">
         <font><font-data afm="Symbol.afm"/></font>
       </font-family>

       <font-family name="ZapfDingbats">
         <font><font-data afm="ZapfDingbats.afm"/></font>
       </font-family>
     </font-group>

     <!-- Other Type1 fonts -->
     <font-group label="Assorted Type 1" embed="true">
       <font-family name="OmegaSerifIPA">
         <font><font-data afm="IPA.afm" pfa="IPA.pfa"
glyph-list="IPA.glyphs"/></font>
       </font-family>
       <font-alias name="OmegaIPA" value="OmegaSerifIPA"/>
       <font-alias name="Phonetic" value="OmegaSerifIPA"/>
     </font-group>

     <!-- GNU FreeFont configuration-->

     <!-- Sample configuration for Windows TrueType fonts. -->

     <font-group xml:base="file:/C:/Windows/Fonts/" label="Windows TrueType" embed="true" subset="true">
       <font-family name="Arial">
         <font><font-data ttf="arial.ttf"/></font>
         <font style="oblique"><font-data ttf="ariali.ttf"/></font>
         <font weight="bold"><font-data ttf="arialbd.ttf"/></font>
         <font weight="bold" style="oblique"><font-data ttf="arialbi.ttf"/></font>
       </font-family>

       <font-family name="Times New Roman" ligatures="&#xFB01; &#xFB02;">
         <font><font-data ttf="times.ttf"/></font>
         <font style="italic"><font-data ttf="timesi.ttf"/></font>
         <font weight="bold"><font-data ttf="timesbd.ttf"/></font>
         <font weight="bold" style="italic"><font-data ttf="timesbi.ttf"/></font>
       </font-family>

       <font-family name="Courier New">
         <font><font-data ttf="cour.ttf"/></font>
         <font style="oblique"><font-data ttf="couri.ttf"/></font>
         <font weight="bold"><font-data ttf="courbd.ttf"/></font>
         <font weight="bold" style="oblique"><font-data ttf="courbi.ttf"/></font>
       </font-family>

       <font-family name="Tahoma" embed="true">
         <font><font-data ttf="tahoma.ttf"/></font>
         <font weight="bold"><font-data ttf="tahomabd.ttf"/></font>
       </font-family>

       <font-family name="Verdana" embed="true">
         <font><font-data ttf="verdana.ttf"/></font>
         <font style="oblique"><font-data ttf="verdanai.ttf"/></font>
         <font weight="bold"><font-data ttf="verdanab.ttf"/></font>
         <font weight="bold" style="oblique"><font-data ttf="verdanaz.ttf"/></font>
       </font-family>

       <font-family name="Palatino" embed="true" ligatures="&#xFB00; &#xFB01; &#xFB02; &#xFB03; &#xFB04;">
         <font><font-data ttf="pala.ttf"/></font>
         <font style="italic"><font-data ttf="palai.ttf"/></font>
         <font weight="bold"><font-data ttf="palab.ttf"/></font>
         <font weight="bold" style="italic"><font-data ttf="palabi.ttf"/></font>
       </font-family>
     </font-group>

     <!-- Required aliases -->
     <font-alias name="monospace" value="Courier"/>
     <font-alias name="sans-serif" value="Helvetica"/>
     <font-alias name="serif" value="Times"/>
     <font-alias name="cursive" value="Times"/>
     <font-alias name="fantasy" value="Times"/>
   </fonts>

On 6/14/2017 10:37 AM, Kevin Brown wrote:
> Please post the whole fonts section.
> That error means it cannot find the font.
> Look up the parent elements for xml:base and see if you did not insert
> this fragment into another section where the xml:base sets the
> directory to something you do not expect.
>
> Kevin Brown
> RenderX
>
> -----Original Message-----
> From: Xep-support [mailto:xep-support-bounces@renderx.com] On Behalf
> Of Mark Giffin
> Sent: Tuesday, June 13, 2017 11:45 PM
> To: RenderX Community Support List <xep-support@renderx.com>
> Subject: [xep-support] Adding Japanese fonts
>
> I'm using XEP 4.22 inside of the DITA Open Toolkit and I'm trying to
> get it to use Japanese fonts by configuring xep.xml. I have this under
> my <fonts>
> element:
>
> <!-- Japanese open type font. -->
> <font-group label="Japanese Open Type" embed="false">
> <font-family name="KozminPro">
> <font><font-data otf="KozMinPr6N-Regular.otf"/></font>
> <font style="italic"><font-data
> otf="KozMinPr6N-Regular.otf"/></font>
> <font weight="bold"><font-data otf="KozGoPr6N-Medium.otf"/></font>
> <font weight="bold" style="italic"><font-data
> otf="KozGoPr6N-Medium.otf"/></font>
> </font-family>
> </font-group>
>
> It's PDF output and the font seems to be installed on my Windows 7 machine.
> KozGoPr6N-Medium.otf and another similar file are in the XEP fonts
> directory.
>
> The PDF comes out with none of the Japanese characters in the original
> XML files, but does display the occasional English word that is in the XML.
>
> I get errors like this from the DITA OT:
>
> transform.fo2pdf.xep:
> [xep] Processing
> C:\Users\Mark\Documents\clients\cloudera\altus-data-engr-docs-ja/temp/
> pdf/to
> pic.fo
> to
> C:\Users\Mark\Documents\clients\cloudera\altus-data-engr-docs-ja\out\p
> df/alt
> us-dataengr.pdf
> [xep] [XEPJ001W][WARN] could not find any font family matching
> "KozMinProVI-Regular,ArialUnicodeMS,Batang"; replaced by Helvetica ...
>
> The OT's font mapping file has this:
>
> <physical-font char-set="Japanese">
> <font-face>KozMinProVI-Regular</font-face>
> </physical-font>
>
> Thanks,
> Mark
>

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Wed Jun 14 15:18:52 2017

This archive was generated by hypermail 2.1.8 : Wed Jun 14 2017 - 15:19:20 PDT