[publican-list] CJK fonts and italics
Jeffrey Fearn
jfearn at redhat.com
Fri Feb 4 00:03:22 UTC 2011
Steve Bonneville wrote:
> On Fri, Feb 04, 2011 at 08:39:32AM +1000, Jeffrey Fearn wrote:
>> Steve Bonneville wrote:
>>> I'm working with some rendering of material to PDF in Publican
>>> that uses CJK fonts (zh-CN, zh-TW, ko-KR, and ja-JP translations).
>>> I'm
>>> noticing that any string tagged in such a way as to set font-style to
>>> italic is getting each Unicode character rendered as missing
>>> character boxes. (In fact, it looks like it may be the
>>> non-character U+FFFF.) In particular this affects <emphasis> and
>>> <firstterm>, but I think this is a general issue with anything the
>>> brand marks as italic.
>>>
>>> I know these fonts don't have a normal italic or oblique style. So,
>>> is there something I can do to fix this? I'd be reasonably happy if
>>> they just rendered as normal-style fonts rather than as missing
>>> characters. I've tested with publican 2.2 and 2.5,
>>> docbook-style-xsl 1.75.2-6, with the Fedora brand and our custom
>>> brand, on Fedora 14.
>>> Um, fop-0.95-5 also.
>> It sounds like either:
>> 1: your font cache is out of date
>> 2: F14 is using unexpected fonts
>> 3: the font metrics aren't being setup correctly
>>
>> To test if it's just the font cache run:
>>
>> $ rm -rf ~/.fop/fop-fonts.cache
>>
>> Then try rebuilding a PDF.
>
> No luck there. Tested this time with Publican-2.2, using ja-JP
> XML files, if that matters.
>
>> If that doesn't help then there is an issue with the font metrics,
>> which is more fiddly. If the above doesn't fix it, please:
>>
>> 1: post the results of:
>>
>> $ ls /usr/share/publican/fop/font-metrics/
>
> -rw-r--r--. 1 root root 509138 Oct 5 20:34 AR_PL_UMing_CN.xml
> -rw-r--r--. 1 root root 509479 Oct 5 20:34 AR_PL_UMing_TW.xml
> -rw-r--r--. 1 root root 437321 Oct 5 20:34 Baekmuk_Batang.xml
>
>> 2: attach your /usr/share/publican/fop/fop.xconf
>
> Attached.
>
>> 3: Open an affected PDF and find out the name of the font being used
>> (File->Properties menu, then Fonts tab).
>
> All fonts are TrueType (CID) embedded subset unless otherwise
> specified.
>
> LiberationMono-Italic
> IPAGothic
> IPAPGothic
> Times-Roman (Type 1, not embedded)
> LiberationSans-Italic
> LiberationSans-BoldItalic
> LiberationMono-BoldItalic
> Symbol (Type 1, not embedded)
>
> Note that roman fonts (like LibSans) work fine for italic/bold-italic,
> it's only if there's a tag which renders to italic around something
> getting set at least partially in IPAPGothic or something similar.
>
> I believe the primary body font is IPAPGothic, looking at pdf.xsl.
Thanks Steve, looks like the font file names changed between F12 and F13
so a bunch of the metrics files aren't being created :(
We will need to do a font audit and see what is going on.
Cheers, Jeff.
--
Jeff Fearn <jfearn at redhat.com>
Software Engineer
Engineering Operations
Red Hat, Inc
All tyranny needs to gain a foothold is for people of good conscience to
remain silent.
- Thomas Jefferson
Perl -- It's like Java, only it lets you deliver on time and under budget.
More information about the publican-list
mailing list