TTFReader did show the sub-fonts.

The problem is that I am trying to do this programatically.  So I do not
really have this information ahead of time.  I was merely using
TTFReader in order to try to understand perhaps what the <font/> mapping
should look like exactly.  So at this point I am not sure exactly to
what format I need to alter the config.  For example, can I treat this
universally and say that all all <font/> definitions from all
EmbedFontInfo will have name/subFontName the same whether its a ttf file
or ttc file?  If not, how can I tell that an EmbedFontInfo represents a
TrueType Collection?  Is the only option to see whether the embed file
ends has a .ttc extebsion?


For example, on this TTC file TTFReader is showing 4 fonts/subfonts:
This is a TrueType collection file with 4 fonts
Containing the following fonts: 
AR PL UMing CN <-- selected
AR PL UMing HK
AR PL UMing TW
AR PL UMing TW MBE
Font Family: [AR PL UMing CN]
Creating xml font file...
Creating CID encoded metrics...
Writing xml font file example-font-metrics.xml...
This font contains no embedding license restrictions.

The one marked "<-- selected" is the one that is coming back from my
call to org.apache.fop.fonts.autodetect.FontInfoFinder#find.  The
returned org.apache.fop.fonts.EmbedFontInfo object has no sub-font name
associated with it; the only place that "AR PL UMing CN" shows up is if
I grab the first font triplet from the EmbedFontInfo as outlined in the
code snippet from the previous email (its code Jason Harrop pointed out
to me).  That triplet has FontTriplet.getName() == "AR PL UMing CN".
There is a second FontTriplet associated with that EmbedFontInfo, with
getName() == "UMingCN" (not sure where that name comes from).

Again I just want to verify that this is the intent.  Can I code to this
behavior and have it continue to work?  Or would you consider this a
bug?  To me, I would think I should get back 4 EmbedFontInfo objects
when I call org.apache.fop.fonts.autodetect.FontInfoFinder#find on this
ttc file: fontInfos[0].subFontName=="AR PL UMing CN",
fontInfos[1].subFontName=="AR PL UMing HK", etc (maybe 8 total depending
on where that "UMingCN" comes from).



On Wed, 2009-06-10 at 18:42 +0200, Andreas Delmelle wrote:
> On 10 Jun 2009, at 16:29, Steve Ebersole wrote:
> 
> > P.S.  I tried running org.apache.fop.fonts.apps.TTFReader to generate
> > the metrics file just to see what FOP itself would recognize here.   
> > But
> > unfortunately I got a resultant metrics file that no text editor on
> > earth seems to be able to open; well OK, no text editor on my  
> > system :)
> 
> Didn't the TTFReader show a list of the sub-fonts before exiting?
> 
> The only thing I can think of now, is that there's something special  
> about that .TTC file...
> 
> You did alter the config as suggested earlier, right? (add the sub- 
> font to the font-element)
> 
> 
> 
> Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
-- 
Steve Ebersole <[email protected]>
Hibernate.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to