You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Graham Hannington <Gh...@csl.com> on 2003/11/26 16:24:20 UTC

Japanese fonts do not appear in desired weights

I'm using FOP to produce English and Japanese PDFs.

For English, I use Helvetica and the system "monospace" (Courier) fonts. For
Japanese, I use MS PMincho and MS Gothic.

In the English PDFs, the fonts appear at their desired weights (such as bold
or normal).

In the Japanese PDFs, the fonts appear at a single weight. PMincho appears
throughout in normal weight, Gothic appears throughout in bold weight.
Weird.

MS PMincho and MS Gothic are defined in TrueType collection (.ttc) files,
msmincho.ttc and msgothic.ttc.

Here's a log of messages from TTFReaderor (for PMincho):

C:\devtools\Docs\fop>java -cp
build\fop.jar;lib\avalon-framework.jar;lib\xml-api
s.jar;lib\xercesImpl.jar;lib\xalan.jar org.apache.fop.fonts.apps.TTFReader
-ttcn
ame "MS PMincho" c:\windows\fonts\msmincho.ttc mspmincho.xml
TTF Reader v1.1.1

Reading c:\windows\fonts\msmincho.ttc...

This is a TrueType collection file with2 fonts
Containing the following fonts:
MS Mincho
* MS PMincho
Number of glyphs in font: 17807
Postscript format 3
Creating xml font file...

Creating CID encoded metrics
Writing xml font file mspmincho.xml...

This font contains no embedding license restrictions


And here's an extract from my userconfig.xml:

<font metrics-file="style\fonts\mspmincho.xml"
embed-file="style\fonts\msmincho.ttc" kerning="yes">
    <font-triplet name="PMincho" style="normal" weight="normal"/>
    <font-triplet name="PMincho" style="normal" weight="bold"/>
    <font-triplet name="PMincho" style="italic" weight="normal"/>
    <font-triplet name="PMincho" style="italic" weight="bold"/>
</font>
<font metrics-file="style\fonts\msgothic.xml"
embed-file="style\fonts\msgothic.ttc" kerning="yes">
    <font-triplet name="Gothic" style="normal" weight="normal"/>
    <font-triplet name="Gothic" style="normal" weight="bold"/>
    <font-triplet name="Gothic" style="italic" weight="normal"/>
    <font-triplet name="Gothic" style="italic" weight="bold"/>
</font>

Yes, the .ttc files *do* exist at that style\fonts\ location, relative to
the .fo input file, when FOP runs... the resulting PDF displays PMincho and
Gothic fine, just not in the right weights.

Any ideas?

Regards,
Graham Hannington

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Japanese fonts do not appear in desired weights

Posted by Chris Bowditch <bo...@hotmail>.
Graham Hannington wrote:

> I'm using FOP to produce English and Japanese PDFs.
> 
> For English, I use Helvetica and the system "monospace" (Courier) fonts. For
> Japanese, I use MS PMincho and MS Gothic.
> 
> In the English PDFs, the fonts appear at their desired weights (such as bold
> or normal).
> 
> In the Japanese PDFs, the fonts appear at a single weight. PMincho appears
> throughout in normal weight, Gothic appears throughout in bold weight.
> Weird.
> 

Unlike M$ Word, XSL-FO processors do not "emulate" bold text. Therefore 
the its up to the source font to contain glyphs for both bold and normal 
weights.

Japanese Fonts typically contain glyphs for one weight. I know this 
because this subject has been discussed on this list before.

Recommended course of action: find a Japanesse font that has glyphs for 
both weights. Although I'm not sure any exist; hence the frequency of 
this question.

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Japanese fonts do not appear in desired weights

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Graham Hannington
>
> I'm using FOP to produce English and Japanese PDFs.
>
<snip />
>
> In the Japanese PDFs, the fonts appear at a single weight. PMincho appears
> throughout in normal weight, Gothic appears throughout in bold weight.
> Weird.
>
> MS PMincho and MS Gothic are defined in TrueType collection (.ttc) files,
> msmincho.ttc and msgothic.ttc.
>

When embedding fonts, a separate metrics file should be generated for bold,
italic and bold-italic (that is, if you want them to work properly). Right
now, your userconfig maps all combinations (normal, bold, italic,
bold-italic) to one and the same metrics file.



Greetz,


Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org