Adding additional fonts to FOP 0.17.0
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:220) 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) - 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 , , . 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...? Thanks in advance for you help. Ricardo Coutinho Developer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Adding additional fonts to FOP 0.17.0
> 2 I managed to generate the metrics file using the latest > Fop-0.19.0-CVS version (I downloaded today) and tha worked. Then you should forget about all you knew about adding fonts to FOP 0.17.0 since you now only need to edit the conf/userconfig.xml file to put your new fonts there. Of course you will not forget to pass this configuration file to Fop as in java $(JFLAGS) org.apache.fop.apps.Fop -c lib/fop-config.xml You will find may own fop-config.xml attached, as an example. Enjoy your new FOP, Alain. fop-config.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Help please with Fonts and FOP : FW: Adding additional fonts to FOP 0.17.0
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]] Sent: Wednesday, June 20, 2001 17:19 PM To: [EMAIL PROTECTED] Subject: Adding additional fonts to FOP 0.17.0 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:220) 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) - 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 , , . 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...? Thanks in advance for you help. Ricardo Coutinho Developer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Help please with Fonts and FOP : FW: Adding additional fonts to FOP 0.17.0
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 , , . 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: [EMAI
RE: Help please with Fonts and FOP : FW: Adding additional fonts to FOP 0.17.0
I tried to run the fop process using the latest CVS version, however i get the following error now D:\TEMP\FOP>fop -c D:\TEMP\FOP\build\classes\conf\userconfig.xml -xml d:\dev\xml\myfile3.xml -xsl d:\dev\xml\miragepdf_.xsl -pdf out.pdf D:\TEMP\FOP>java -cp fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\jimi-1.0. jar org.apache.fop.apps.Fop -c D:\TEMP\FOP\build\clas ses\conf\userconfig.xml -xml d:\dev\xml\myfile3.xml -xsl d:\dev\xml\miragepdf_.xsl -pdf out.pdf reading user configuration file FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree javax.xml.transform.TransformerException at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1212) at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894) at java.lang.Thread.run(Thread.java:484) - java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:167) at org.apache.xalan.transformer.ResultTreeHandler.characters(ResultTreeHandler. java:446) at org.apache.xalan.stree.TextImpl.dispatchCharactersEvent(TextImpl.java:157) at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja va:449) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav a:193) at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja va:495) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav a:193) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894) at java.lang.Thread.run(Thread.java:484) ERROR: null Any ideas? The same Xml/xsl works with FOP 0.17.0 Ricardo -Original Message- From: Petr Andrs [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 12:46 PM To: [EMAIL PROTECTED] Subject: Re: Help please with Fonts and FOP : FW: Adding additional fonts to FOP 0.17.0 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