I have some experience with embedding TTF to be able use special 
characters used across central an eastern Europe which are not covered 
by WinAnsiEncoding. I recommend you to use recent CVS version since 
there were some bugs concerning TTFs which were fixed two weeks ago. 
Some more comments are written directly into your message.

On 22 Jun 2001, at 11:47 Ricardo Coutinho wrote about Help please with Fonts and FOP : 
FW :

> Hi
> 
> I posted this message a couple of days back regarding adding additional
> fonts to FOP. Unfortunately I did not get much response to my problem.
> Can someone please give me a few pointers on how to get wround my
> problem.
> 
> Thanks in advance....
> 
> Ricardo Coutinho
> 
> -----Original Message-----
> From: Ricardo Coutinho [mailto:[EMAIL PROTECTED]]
> 
> Hi all
> 
> I am trying to use additional fonts as part in my PDF creation process.
> However I am getting a number of errors/funnies which is making my life
> difficult.
> 
> 1. I get the error below when trying to generate the font metrics file
> for the Arial font. TTF Reader v1.0
> 
> Reading D:\winnt\fonts\arial.ttf...
> 
> Read dir tab [68 83 73 71] offset: 146136 length: 5096 name: DSIG
> Read dir tab [76 84 83 72] offset: 6752 length: 659 name: LTSH
> Read dir tab [79 83 47 50] offset: 456 length: 86 name: OS/2
> Read dir tab [80 67 76 84] offset: 146080 length: 54 name: PCLT
> Read dir tab [86 68 77 88] offset: 7412 length: 4500 name: VDMX
> Read dir tab [99 109 97 112] offset: 3704 length: 1734 name: cmap
> Read dir tab [99 118 116 32] offset: 15432 length: 1416 name: cvt
> Read dir tab [102 112 103 109] offset: 13976 length: 1456 name: fpgm
> Read dir tab [103 97 115 112] offset: 544 length: 16 name: gasp Read dir
> tab [103 108 121 102] offset: 35316 length: 100434 name: glyf Read dir
> tab [104 100 109 120] offset: 19468 length: 15848 name: hdmx Read dir
> tab [104 101 97 100] offset: 332 length: 54 name: head Read dir tab [104
> 104 101 97] offset: 388 length: 36 name: hhea Read dir tab [104 109 116
> 120] offset: 16848 length: 2620 name: hmtx Read dir tab [107 101 114
> 110] offset: 140608 length: 5472 name: kern Read dir tab [108 111 99 97]
> offset: 5440 length: 1312 name: loca Read dir tab [109 97 120 112]
> offset: 424 length: 32 name: maxp Read dir tab [110 97 109 101] offset:
> 560 length: 3143 name: name Read dir tab [112 111 115 116] offset:
> 135752 length: 4856 name: post Read dir tab [112 114 101 112] offset:
> 11912 length: 2063 name: prep java.io.EOFException: Reached EOF, file
> size=151232
>         at
> org.apache.fop.fonts.FontFileReader.readTTFString(FontFileReader.java:22
> 0)
>         at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:221)
>         at
>         org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:207)
>         at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:176)
> 
>                    -----------------------------------------------------
>                    ----
> ------------------------

As I stated, there were some bugs time ago, also in TTF reader, so use 
recent CVS version of FOP. If some problem persists, downloading 
freshest fonts from www.microsoft.com/typography can't hurt. I am using 
TTFReader with option "-enc cid" and this works perfectly for me, I 
have no experience with the other encoding methods since they are 
useless for me.

> 
> 
> 2 I managed to generate the metrics file using the latest Fop-0.19.0-CVS
> version (I downloaded today) and tha worked. However the generate
> process seemed to skip out certain nodes that the version 1.0 TTF reader
> creates ie <class-name>, <first-char>, <last-char>. Without those
> entries I was not able to rebuild FOP TTF Reader v1.1.1
> 
> Reading D:\winnt\fonts\arial.ttf...
> 
> Number of glyphs in font: 655
> Creating xml font file...
> 
> Creating CID encoded metrics
> Writing xml font file Arial.xml...
> 
> This font contains no embedding license restrictions
>                    -----------------------------------------------------
>                    ----
> ------------------------
> 
> 3 I did finaly manage to rebuild FOP with the Arial font built in.
> However, the resulting PDF was all messed up. I have attached snippets
> of the 2 outputs. Did this happen because the font-metrics file is
> missing entries...?

Again, use latest CVS version, now font embeding is done without need 
for rebuild. Specify your fonts in userconfig.xml. I managed to do this 
with documentation so you can do it as well. And last advice, try to 
use Unicoded FO files (UTF-8,UTF-16). These works perfectly and 
according to XML specification UTF-8 and UTF-16 are only encodings that 
are required to be supported. I haven't tested any other encoding and 
there may be problems (now I recall that I had problem with ISO-8859-2 
so I switched to UTF-8)
 
> Thanks in advance for you help.

I hope this helps
 
> 
> Ricardo Coutinho
> Developer

pa

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

Reply via email to