As there is cmap issue with using ttf files like STHeiTi.ttf, I tried to
generate XML metrics file for STHeiTi.pfm using PFMReader and I have been
successfully able to do that and define the mapping in config file as
follows:
<font-triplet name="STHeiTi" style="normal"
weight="normal"/>
Now the issue is that on running xsl through FOP processor, font fails to
embed in the pdf file and a sequence of # characters appears in place of the
chinese text due to unavailability of supporting fonts. Any ideas why it
fails to embed?
Jeremias Maerki-2 wrote:
>
> On 27.03.2008 05:25:12 xsltuser wrote:
>>
>>
>> We are open to using either AFM or TrueType fonts whichever gets the
>> Chinese
>> fonts working for us.
>> Fortunately, I have been able to identify the root cause of the issue.
>> FOP
>> processor fails to parse any ttf file which does not have the
>> corresponding
>> cmap table. Heres the sample output:
>>
>> TTF Reader for Apache FOP 0.94
>>
>> Parsing font...
>> Reading fonts/Helvetica.ttf...
>> Unicode cmap table not present
>> Unsupported format: Aborting
>>
>> I have been able to successfully use <auto-detect/> for the fonts with
>> CMAP
>> table but not the ones without it. Is this a bug with TTFReader?
>
> It's rather a missing/unimplemented feature that is documented here:
> http://xmlgraphics.apache.org/fop/0.95/fonts.html#truetype-metrics
>
> Help is welcome to add support for TrueType fonts that don't have a
> Unicode CMap. Otherwise, I guess you'll have to find a different font.
>
>> We are sure the characters we want to show are really available in
>> this font as they show up when rendered with alternate APIs avaliable
>> like
>> iText.
>>
>>
>>
>>
>>
>> Jeremias Maerki-2 wrote:
>> >
>> > AFM is for Type 1 fonts. You're talking about TrueType fonts. That's
>> two
>> > different pairs of shoes.
>> >
>> > - What's FOP's log output for your document?
>> > - You specified <auto-detect/>. Is this font properly installed in your
>> > operating system? If not, FOP cannot find it and you might have to use
>> > the "directory" element instead.
>> > - Are you sure the characters you want to show are really available in
>> > this font?
>> >
>> > On 26.03.2008 14:05:04 xsltuser wrote:
>> >>
>> >> I'm not able to get this work with FOP 0.95beta as well.
>> >> Is there a way I can convert TTF to AFM file format and set the same
>> in
>> >> FOP
>> >> configuration to get the Chinese Fonts working?
>> >>
>> >>
>> >>
>> >>
>> >> Jeremias Maerki-2 wrote:
>> >> >
>> >> > 0.94 still has a few issues with detecting the right font names. FOP
>> >> > 0.95beta should behave correctly.
>> >> >
>> >> > On 26.03.2008 11:35:14 xsltuser wrote:
>> >> >>
>> >> >> Thanks for the info.
>> >> >>
>> >> >> I've now configured my FOP configuration file as
>> >> >>
>> >> >> <fonts>
>> >> >> <!-- automatically detect operating system installed fonts -->
>> >> >> <auto-detect/>
>> >> >> </fonts>
>> >> >>
>> >> >> In my xsl, I'm setting font-family="'LeHei Pro'" where 'LeHei Pro'
>> is
>> >> the
>> >> >> System Font in Chinese collection.
>> >> >> When I run this through FOP processor (0.94), resulting PDF file
>> >> contains
>> >> >> sequences of # where I'm expecting chinese characters. Is this
>> because
>> >> >> FOP
>> >> >> is not able to locate this font? Any help in this regard is
>> >> appreciated.
>> >> >>
>> >> > <snip/>
>> >> >
>> >> >
>> >
>> >
>> >
>> >
>> > Jeremias Maerki
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Metrics-Format-tp16295993p16321428.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Metrics-Format-tp16295993p16323996.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]