Re: Fonts in FOP
Nuno I am also working on a similar issue which involves Japanese fonts but dont have it in a working condition. These are the points I have learned in process. 1) Open the ttfcomic.xml and see whats the name given in the font-name tag? This name should match the ComicSansMS as you have given in font-triplet tag in the userconfig.xml 2) I would advice for time being to hardcode the complete path to ttfcomic.xml as font metrics-file=c:\dir\ttfcomic.xml just like you did for the embed-file 3) No need to change build.xml 4) No need to recompile fop.jar 5) You need to load the fonts by invoking the configuration before your parse XML -- PDF. How are you doing the xml to pdf ? I am using the XSLTInputHandler(xml,xsl) in a servlet or are u running it from command prompt ? 6) I came to know today that I need to manually change the XSL file ( which i had created using XMLSPY) to refer to the font explicitly using the font-family tag. (courtsey of Lou ) fo:block font-family=ComicSansMS font-weight=bold padding-bottom=1mm #x7ecf;#x8425;#x5355;#x4f4d; /fo:block Let me know Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 08:32 Subject: Fonts in FOP Please respond to fop-user Hello, I need to include a new font in FOP. I already generate a new xml file of the font comic.ttf (ttfcomic.xml), and in the userconfig.xml added the new font. font metrics-file=ttfcomic.xml kerning=yes embed-file=c:\windows\fonts\comic.ttf font-triplet name=ComicSansMS style=normal weight=normal/ /font To recompile the fop.jar, what is necessary to configure? Is it necessary anything else in the build.xml of FOP? And where should I put the new ttfcomic.xml file for the new font? Is it in /src/codegen? Next in the XSL-FO, how can I refer the new font? The font name should be ComicSansMS like refer above or the name of the font file? font-style=ComicSansMS Thanks in advance. Best regards. Nuno Canais - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fonts in FOP
Hi Manoj, Thanks for your help. I really need to re-build fop.jar, because my web application uses it standalone and I don't have code access. I think I really should configure something in the build.xml of FOP. Something like: property name=ttfcomic.xml value=${build.codegen}/ttfcomic.xml/ I need to know, what and how do I need to configure? Nuno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 4 de Fevereiro de 2005 17:48 To: [EMAIL PROTECTED] Subject: Re: Fonts in FOP Nuno I am also working on a similar issue which involves Japanese fonts but dont have it in a working condition. These are the points I have learned in process. 1) Open the ttfcomic.xml and see whats the name given in the font-name tag? This name should match the ComicSansMS as you have given in font-triplet tag in the userconfig.xml 2) I would advice for time being to hardcode the complete path to ttfcomic.xml as font metrics-file=c:\dir\ttfcomic.xml just like you did for the embed-file 3) No need to change build.xml 4) No need to recompile fop.jar 5) You need to load the fonts by invoking the configuration before your parse XML -- PDF. How are you doing the xml to pdf ? I am using the XSLTInputHandler(xml,xsl) in a servlet or are u running it from command prompt ? 6) I came to know today that I need to manually change the XSL file ( which i had created using XMLSPY) to refer to the font explicitly using the font-family tag. (courtsey of Lou ) fo:block font-family=ComicSansMS font-weight=bold padding-bottom=1mm #x7ecf;#x8425;#x5355;#x4f4d; /fo:block Let me know Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 08:32 Subject: Fonts in FOP Please respond to fop-user Hello, I need to include a new font in FOP. I already generate a new xml file of the font comic.ttf (ttfcomic.xml), and in the userconfig.xml added the new font. font metrics-file=ttfcomic.xml kerning=yes embed-file=c:\windows\fonts\comic.ttf font-triplet name=ComicSansMS style=normal weight=normal/ /font To recompile the fop.jar, what is necessary to configure? Is it necessary anything else in the build.xml of FOP? And where should I put the new ttfcomic.xml file for the new font? Is it in /src/codegen? Next in the XSL-FO, how can I refer the new font? The font name should be ComicSansMS like refer above or the name of the font file? font-style=ComicSansMS Thanks in advance. Best regards. Nuno Canais - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fonts in FOP
Nuno So who is invoking FOP ? Dont you write code to invoice it somewhere in the web application ? I am using XSLTInputhandler explicitly in my servlet to do the xml to pdf conversion and then render the pdf using acrobat. All this happens in the servlet within the weblogic application server paradigm. Right now I have hardcode the userconfig.xml file in the servlet as File userConfigFile = new File(C:\\fop-0.20.5\\conf\\userconfig.xml); I need to find a way to not hardcode it as its deployed as a jar file on production server. Thanks Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 10:49 Subject: RE: Fonts in FOP Please respond to fop-user Hi Manoj, Thanks for your help. I really need to re-build fop.jar, because my web application uses it standalone and I don't have code access. I think I really should configure something in the build.xml of FOP. Something like: property name=ttfcomic.xml value=${build.codegen}/ttfcomic.xml/ I need to know, what and how do I need to configure? Nuno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 4 de Fevereiro de 2005 17:48 To: [EMAIL PROTECTED] Subject: Re: Fonts in FOP Nuno I am also working on a similar issue which involves Japanese fonts but dont have it in a working condition. These are the points I have learned in process. 1) Open the ttfcomic.xml and see whats the name given in the font-name tag? This name should match the ComicSansMS as you have given in font-triplet tag in the userconfig.xml 2) I would advice for time being to hardcode the complete path to ttfcomic.xml as font metrics-file=c:\dir\ttfcomic.xml just like you did for the embed-file 3) No need to change build.xml 4) No need to recompile fop.jar 5) You need to load the fonts by invoking the configuration before your parse XML -- PDF. How are you doing the xml to pdf ? I am using the XSLTInputHandler(xml,xsl) in a servlet or are u running it from command prompt ? 6) I came to know today that I need to manually change the XSL file ( which i had created using XMLSPY) to refer to the font explicitly using the font-family tag. (courtsey of Lou ) fo:block font-family=ComicSansMS font-weight=bold padding-bottom=1mm #x7ecf;#x8425;#x5355;#x4f4d; /fo:block Let me know Manoj [EMAIL PROTECTED] wareag.com To: [EMAIL PROTECTED] cc: 2005/02/04 08:32 Subject: Fonts in FOP Please respond to fop-user Hello, I need to include a new font in FOP. I already generate a new xml file of the font comic.ttf (ttfcomic.xml), and in the userconfig.xml added the new font. font metrics-file=ttfcomic.xml kerning=yes embed-file=c:\windows\fonts\comic.ttf font-triplet name=ComicSansMS style=normal weight=normal/ /font To recompile the fop.jar, what is necessary to configure? Is it necessary anything else in the build.xml of FOP? And where should I put the new ttfcomic.xml file for the new font? Is it in /src/codegen? Next in the XSL-FO, how can I refer the new font? The font name should be ComicSansMS like refer above or the name of the font file? font-style=ComicSansMS Thanks in advance. Best regards. Nuno Canais - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Fonts:: Can fop display *any* local font
You can embed any font in the generated PDF following the instructions given here http://xml.apache.org/fop/fonts Your catalog of fonts are in your machine. So create a script to generate the font metric files, edit the userconfig.xml file and then generate an FO document that displays some text in each of the fonts. Chuck Stephen Clarke wrote: Hi all, Is it possible to display *any* locally installed font or are we limited to just a few main ones? As I recall, fop is limited to just four or five main fonts for display in pdf output. Is that correct? I'm interested in making a catalogue of all locally available fonts. I was thinking, one way might be through xml and fop to pdf. But probably not a good idea, no? Last time I did it in Flash, but it was awfully complicated and painstaking. I want some way of arranging the fonts together, sans, serif, cursive, etc. Any help appreciated. -- sc
Re: Fonts:: Can fop display *any* local font
Many thanks, Chuck. That's pretty much what I was thinking. I wasn't sure about embedding the fonts. Thanks, -- best,sc - Original Message - From: Chuck Paussa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 5:44 PM Subject: Re: Fonts:: Can fop display *any* local font You can embed any font in the generated PDF following the instructions given here http://xml.apache.org/fop/fonts Your catalog of fonts are in your machine. So create a script to generate the font metric files, edit the userconfig.xml file and then generate an FO document that displays some text in each of the fonts. Is it possible to display *any* locally installed font or are we limited to just a few main ones? As I recall, fop is limited to just four or five main fonts for display in pdf output. Is that correct? I'm interested in making a catalogue of all locally available fonts. I was thinking, one way might be through xml and fop to pdf. But probably not a good idea, no?