Re: [docbook-apps] fop and embedding fonts
Thanks David, I'm working on a Linux box, and was trying to use the fonts from my TeX installation. I did finally succeed: These lines in the fop configuration file: directory recursive=true/AppDocs/tex/texlive/texmf-dist/fonts/truetype/directory directory recursive=true/AppDocs/tex/texlive/texmf-dist/fonts/type1/directory That will automatically embed the fonts; if there is a type1 font with the same name as a truetype font, it wins (I guess because it comes second in the list). However, in my version of fop (1.1), subsetting type1 fonts is not supported. Also, by specifying the body font in the stylesheets like this: xsl:param name=body.font.family select='NimbusRomNo9L-Regu, Meiryo'/ For Latin characters, the Nimbus fonts are used (it is a Times clone), and when it runs into characters not available in that font, it switches to Meiryo (a Japanese Unicode font). thanks, --Tim On Fri, Dec 12, 2014 at 10:57 AM, David Goss g...@fstrf.org wrote: Do you have your conf file to set to look for system fonts: fonts directory recursive=trueC:\Windows\Fonts/directory auto-detect/ /fonts If so, and if you have DroidSans available as a system font, it might be trying to pull the system version (which might an open type font, which FOP wouldn't support). I've always had bad luck with FOP's font configuration. The only success I've ever had is just installing the ttf version of the font on the system. -- *David Goss*, Technical Writer Frontier Science | www.fstrf.org 4033 Maple Rd, Amherst, NY 14226 (716) 834-0900 extension 7204 -- *From: *Tim Arnold jtim.arn...@gmail.com *To: *docbook-apps docbook-apps@lists.oasis-open.org *Sent: *Friday, December 12, 2014 10:44:42 AM *Subject: *[docbook-apps] fop and embedding fonts Hi, I'm attempting font-embedding with Apache FOP 1.1 with difficulties. Is there a tutorial on setting this up? In my xsl customization layer I set body.font.family to 'Droid'. xsl:param name=body.font.familyDroid/xsl:param In my fo configuration file, I specify the TrueType font: font embed-url=file:///AppDocs/tex/texlive/texmf-dist/fonts/truetype/public/droid/DroidSans.ttf font-triplet name=Droid style=normal weight=normal/ /font specified in the renderer for application/pdf. When I compile the document, I don't see any errors or warnings, but Droid is not listed in the fonts, let alone being embedded. But the settings have some effect though, since the body text in the pdf has '#' for each character that is supposed to be in the body font. I am reading the fop fonts doc (with 1.1 the metrics are optional it says). http://xmlgraphics.apache.org/fop/1.1/fonts.html and the DocBook XSL Guide on fonts: http://www.sagehill.net/docbookxsl/AddFont.html Anyone see what I'm doing wrong? thanks, --Tim
Re: [docbook-apps] fop and embedding fonts
I believe the @name attribute in font-triplet must match the font name recorded in the font file, which is DroidSans in this case. There are ways to alias fonts in FOP, but not by just using the name attribute. Bob Stayton Sagehill Enterprises b...@sagehill.net On 12/12/2014 7:44 AM, Tim Arnold wrote: Hi, I'm attempting font-embedding with Apache FOP 1.1 with difficulties. Is there a tutorial on setting this up? In my xsl customization layer I set body.font.family to 'Droid'. xsl:param name=body.font.familyDroid/xsl:param In my fo configuration file, I specify the TrueType font: font embed-url=file:///AppDocs/tex/texlive/texmf-dist/fonts/truetype/public/droid/DroidSans.ttf font-triplet name=Droid style=normal weight=normal/ /font specified in the renderer for application/pdf. When I compile the document, I don't see any errors or warnings, but Droid is not listed in the fonts, let alone being embedded. But the settings have some effect though, since the body text in the pdf has '#' for each character that is supposed to be in the body font. I am reading the fop fonts doc (with 1.1 the metrics are optional it says). http://xmlgraphics.apache.org/fop/1.1/fonts.html and the DocBook XSL Guide on fonts: http://www.sagehill.net/docbookxsl/AddFont.html Anyone see what I'm doing wrong? thanks, --Tim - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] fop and embedding fonts
Do you have your conf file to set to look for system fonts: fonts directory recursive=trueC:\Windows\Fonts/directory auto-detect/ /fonts If so, and if you have DroidSans available as a system font, it might be trying to pull the system version (which might an open type font, which FOP wouldn't support). I've always had bad luck with FOP's font configuration. The only success I've ever had is just installing the ttf version of the font on the system. -- David Goss , Technical Writer Frontier Science | www.fstrf.org 4033 Maple Rd, Amherst, NY 14226 (716) 834-0900 extension 7204 From: Tim Arnold jtim.arn...@gmail.com To: docbook-apps docbook-apps@lists.oasis-open.org Sent: Friday, December 12, 2014 10:44:42 AM Subject: [docbook-apps] fop and embedding fonts Hi, I'm attempting font-embedding with Apache FOP 1.1 with difficulties. Is there a tutorial on setting this up? In my xsl customization layer I set body.font.family to 'Droid'. xsl:param name=body.font.familyDroid/xsl:param In my fo configuration file, I specify the TrueType font: font embed-url=file:///AppDocs/tex/texlive/texmf-dist/fonts/truetype/public/droid/DroidSans.ttf font-triplet name=Droid style=normal weight=normal/ /font specified in the renderer for application/pdf. When I compile the document, I don't see any errors or warnings, but Droid is not listed in the fonts, let alone being embedded. But the settings have some effect though, since the body text in the pdf has '#' for each character that is supposed to be in the body font. I am reading the fop fonts doc (with 1.1 the metrics are optional it says). http://xmlgraphics.apache.org/fop/1.1/fonts.html and the DocBook XSL Guide on fonts: http://www.sagehill.net/docbookxsl/AddFont.html Anyone see what I'm doing wrong? thanks, --Tim