Hi Mehdi, Thanks for your help.
As per you expected in my "fo" I have changed as follows: <fo:block font-size="10pt" line-height="10.5pt" text-align="justify" font-family="tnr"> Actually what is the problem with Default times is, I assume it is a postscript font "TimesNewRomanPSMT". This supports only ASCII range. Whereas in "Times New Roman (TrueType)" we have UTF-8 support character ranges. So that, I tried to substitute that. But eventhough I have updated my fo. In the pdf it only embedded default font Thanks, Srikrishnan -----Original Message----- From: mehdi houshmand [mailto:med1...@gmail.com] Sent: Monday, November 08, 2010 3:46 PM To: fop-users@xmlgraphics.apache.org Subject: Re: font configuration in fop Hi SriKrishnan, Yes the XML font matrix is deprecated, it's probably something I should have said before but it's all in the wiki so I presumed you looked in there first. As for your problem with Times New Roman font, I'm not 100% on this, but I think it's because you've using "<font-triplet name="tnr"...", thus your new font will be called "tnr" rather than "Times New Roman". Also, I'm not sure it's wise to name the same font with 2 names (just as a matter of principle) as you have with almost all your manually configured fonts, unless you know what you're doing, in which case ignore me. I hope that helps Mehdi On 8 November 2010 09:44, SriKrishnan <srikrish...@techset.co.uk> wrote: > Hi Mehdi, > > Sorry I forgot that, yes as per the syntax we are not used "fop" at the time > of creating font file. > > I came to know from Document that in newer version, we dont need to create > xml font matrics. So now I just added the following lines in my font > configuration xml file as follows: > > <font kerning="yes" embed-url="C:\Advent\3b2fonts\TrueTypeFonts\ARIALN.TTF"> > <font-triplet name="ArialN" style="normal" weight="normal"/> > <font-triplet name="ArialNTT" style="normal" weight="normal"/> > </font> > <font kerning="yes" > embed-url="C:\Advent\3b2fonts\TrueTypeFonts\ARIALNB.TTF"> > <font-triplet name="ArialN" style="normal" weight="bold"/> > <font-triplet name="ArialNTT" style="normal" weight="bold"/> > </font> > <font kerning="yes" > embed-url="C:\Advent\3b2fonts\TrueTypeFonts\ARIALNBI.TTF"> > <font-triplet name="ArialN" style="italic" weight="bold"/> > <font-triplet name="ArialNTT" style="italic" weight="bold"/> > </font> > <font kerning="yes" > embed-url="C:\Advent\3b2fonts\TrueTypeFonts\ARIALNI.TTF"> > <font-triplet name="ArialN" style="italic" weight="normal"/> > <font-triplet name="ArialNTT" style="italic" weight="normal"/> > </font> > <font kerning="yes" embed-url="C:\Advent\3b2fonts\TrueTypeFonts\times.ttf"> > <font-triplet name="tnr" style="normal" weight="normal"/> > <font-triplet name="tnrTT" style="normal" weight="normal"/> > </font> > <font kerning="yes" > embed-url="C:\Advent\3b2fonts\TrueTypeFonts\timesbd.ttf"> > <font-triplet name="tnr" style="normal" weight="bold"/> > <font-triplet name="tnrTT" style="normal" weight="bold"/> > </font> > <font kerning="yes" > embed-url="C:\Advent\3b2fonts\TrueTypeFonts\timesbi.ttf"> > <font-triplet name="tnr" style="italic" weight="bold"/> > <font-triplet name="tnrTT" style="italic" weight="bold"/> > </font> > <font kerning="yes" embed-url="C:\Advent\3b2fonts\TrueTypeFonts\timesi.ttf"> > <font-triplet name="tnr" style="italic" weight="normal"/> > <font-triplet name="tnrTT" style="italic" weight="normal"/> > </font> > > <!--<directory recursive="true">C:\Windows\Fonts</directory>--> > <directory recursive="true">C:\Advent\3b2fonts\OpenTypeFonts</directory> > <directory recursive="true">C:\Advent\3b2fonts\TrueTypeFonts</directory> > <auto-detect/> > </fonts> > > It works as per my expectation. The only problem is base font "Times New > Roman" was not substituted by the configured Times font. > > Can anybody help me, how to overwrite default base font? > > Thanks, > Srikrishnan > -----Original Message----- > From: mehdi houshmand [mailto:med1...@gmail.com] > Sent: Monday, November 08, 2010 3:03 PM > To: fop-users@xmlgraphics.apache.org > Subject: Re: font configuration in fop > > Hi SriKrishnan, > > It may be so, but if you're using the command you've specified above, > you've not invoking this with the fop.bat, you're using the "java" > command and specifying the class path directly, thus the "java -cp" > (cp = classpath). The fop.bat is just a file that contains all the > commands that you'd otherwise write in the command line, it must be > called directly if you want to take advantage of the parameters within > it. Since you're not using the fop.bat you'll need to include > xmlgraphics-commons when you're calling TTFReader, because TTFReader > references org.apache.xmlgraphics.fonts.Glyphs. > > Hope I've made myself clear there. > > Mehdi > > On 8 November 2010 09:13, SriKrishnan <srikrish...@techset.co.uk> wrote: >> Hi Mehdi, >> >> It is already defined in "fop.bat" file as follows: >> >> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xmlgraphics-commons-1.4.jar >> >> Thanks, >> Srikrishnan >> >> -----Original Message----- >> From: mehdi houshmand [mailto:med1...@gmail.com] >> Sent: Monday, November 08, 2010 2:35 PM >> To: fop-users@xmlgraphics.apache.org >> Subject: Re: font configuration in fop >> >> Hi SriKrishnan, >> >> You also need to include the xmlgraphics-commons JAR file to your >> class path, it's in the FOP directory in [FOP]/lib folder. Just to >> add, when you execute the command you'll see that Open-Type Compact >> Font Format aren't supported yet. Just so you know, I don't know if >> you want to continue on this path. >> >> Thanks >> >> Mehdi >> >> On 8 November 2010 08:42, SriKrishnan <srikrish...@techset.co.uk> wrote: >>> Hi Mehdi, >>> >>> Here I have attached the font >>> >>> Thanks, >>> Srikrishnan >>> >>> -----Original Message----- >>> From: mehdi houshmand [mailto:med1...@gmail.com] >>> Sent: Monday, November 08, 2010 1:44 PM >>> To: fop-users@xmlgraphics.apache.org >>> Subject: Re: font configuration in fop >>> >>> Hi SriKrishnan, >>> >>> Could you send the font file? >>> >>> Thanks >>> >>> Mehdi >>> >>> On 8 November 2010 03:13, SriKrishnan <srikrish...@techset.co.uk> wrote: >>>> Hi Mehdi, >>>> >>>> Thanks for your guidance. I have changed the syntax errors I done as per >>> you >>>> mentioned, it moves the lines further. But still there are some errors >>>> occurs. Can You help me to identify these? >>>> >>>> FYR: >>>> C:\>java -cp >>>> >>> >> > "C:\fop-1.0\build\fop.jar";"C:\fop-1.0\lib\avalon-framework-4.2.0.jar";"C:\f >>>> >>> >> > op-1.0\lib\commons-logging-1.0.4.jar";"C:\fop-1.0\lib\commons-io-1.3.1.jar" >>>> org.apache.fop.fonts.apps.TTFReader -d >>>> "C:\Advent\3b2fonts\OpenTypeFonts\Goudy.otf" Goudy.xml >>>> TTF Reader for Apache FOP 1.0 >>>> >>>> Parsing font... >>>> Reading C:\Advent\3b2fonts\OpenTypeFonts\Goudy.otf... >>>> sfnt version: OpenType with CFF data >>>> Reading 10 dir tables >>>> dir tables: [post, CFF , name, cmap, OS/2, hmtx, head, GPOS, maxp, hhea] >>>> flags: 3 - 11 >>>> unit per em: 1000 >>>> font bbox: xMin=-168 yMin=-213 xMax=1001 yMax=967 >>>> Number of glyphs in font: 229 >>>> hhea.Ascender: 967 -> 967 internal units >>>> hhea.Descender: -213 -> -213 internal units >>>> Number of horizontal metrics: 229 >>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>> org/apache/xmlgraphics/fonts/Glyphs >>>> at >>>> org.apache.fop.fonts.truetype.TTFFile.initAnsiWidths(TTFFile.java:492) >>>> at >> org.apache.fop.fonts.truetype.TTFFile.readFont(TTFFile.java:541) >>>> at > org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:209) >>>> at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:164) >>>> Caused by: java.lang.ClassNotFoundException: >>>> org.apache.xmlgraphics.fonts.Glyphs >>>> at java.net.URLClassLoader$1.run(Unknown Source) >>>> at java.security.AccessController.doPrivileged(Native Method) >>>> at java.net.URLClassLoader.findClass(Unknown Source) >>>> at java.lang.ClassLoader.loadClass(Unknown Source) >>>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) >>>> at java.lang.ClassLoader.loadClass(Unknown Source) >>>> ... 4 more >>>> >>>> Thanks, >>>> Srikrishnan >>>> >>>> -----Original Message----- >>>> From: mehdi houshmand [mailto:med1...@gmail.com] >>>> Sent: Thursday, November 04, 2010 7:08 PM >>>> To: fop-users@xmlgraphics.apache.org >>>> Subject: Re: font configuration in fop >>>> >>>> Hi SriKrishnan, >>>> >>>> Just to add, I forgot to mention, you're also using the the wrong >>>> character to denote folders "/" is a Unix/Linux folder separator, in >>>> windows command line you have to use "\". So your final command should >>>> be: >>>> >>>> java -cp >>>> >>> >> > "C:\fop-1.0\build\fop.jar";"C:\fop-1.0\lib\avalon-framework-4.2.0.jar";"C:\f >>>> >>> >> > op-1.0\lib\commons-logging-1.0.4.jar";"C:\fop-1.0\lib\commons-io-1.3.1.jar" >>>> org.apache.fop.fonts.apps.TTFReader -d "C:\OpenTypeFonts\Goudy.otf" >>>> Goudy.xml >>>> >>>> That is of course presuming everything is in the correct directories >>>> as specified. >>>> >>>> Thanks >>>> >>>> Mehdi >>>> >>>> On 4 November 2010 12:29, Chen Yang <cy...@hrsg.ca> wrote: >>>>> Hi Srikrishnan, >>>>> >>>>> >>>>> >>>>> Here is the command I used for Chinese fonts in Linux >>>>> >>>>> >>>>> >>>>> # java cp >>>>> >>>> >>> >> > /root/Desktop/fop/build/fop.jar:/root/Desktop/fop/lib/avalon-framework-4.2.0 >>>> >>> >> > .jar:/root/Desktop/fop/lib/commons-logging-1.0.4.jar:/root/Desktop/fop/lib/c >>>> ommons-io-1.3.1.jar:/root/Desktop/fop/lib/xmlgraphics-commons-1.4.jar >>>>> org.apache.fop.fonts.apps.TTFReader /usr/share/fonts/simhei/simhei.ttf >>>>> /usr/share/fonts/simhei/simhei.xml >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Chen >>>>> >>>>> >>>>> >>>>> From: SriKrishnan [mailto:srikrish...@techset.co.uk] >>>>> Sent: November-04-10 6:11 AM >>>>> To: fop-users@xmlgraphics.apache.org >>>>> Subject: font configuration in fop >>>>> >>>>> >>>>> >>>>> Hi All, >>>>> >>>>> >>>>> >>>>> I want to configure Goudy font in my fop. I tried something like > below >>>> as >>>>> per mentioned in the Documentation: >>>>> >>>>> >>>>> >>>>> D:\xslfo>java -cp >>>>> >>>> >>> >> > "C:/fop-1.0/build/fop.jar";"C:/fop-1.0/lib/avalon-framework-4.2.0.jar";"C:/f >>>> >>> >> > op-1.0/lib/commans-logging-1.0.4.jar";"C:/fop-1.0/lib/commons-io-1.3.1.jar" >>>>> org.apache.fop.fonts.apps.TTFReader -d "C:/ OpenTypeFonts/Goudy.otf" >>>>> Goudy.xml >>>>> >>>>> >>>>> >>>>> But I encountered some error message as follows: >>>>> >>>>> >>>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>> org/apache/commons/logging/LogFactory >>>>> >>>>> at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:119) >>>>> >>>>> Caused by: java.lang.ClassNotFoundException: >>>>> org.apache.commons.logging.LogFactory >>>>> >>>>> at java.net.URLClassLoader$1.run(Unknown Source) >>>>> >>>>> at java.security.AccessController.doPrivileged(Native Method) >>>>> >>>>> at java.net.URLClassLoader.findClass(Unknown Source) >>>>> >>>>> at java.lang.ClassLoader.loadClass(Unknown Source) >>>>> >>>>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) >>>>> >>>>> at java.lang.ClassLoader.loadClass(Unknown Source) >>>>> >>>>> ... 1 more >>>>> >>>>> >>>>> >>>>> Can anybody helpme to understand what about this? And how to solve > this? >>>>> >>>>> >>>>> >>>>> Thanks in Advance, >>>>> >>>>> Srikrishnan >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org