[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Publishing Character Entities (%isopub;) in PDF from DocBook XML
WOOO HOOO!!! It works. This is in my userconfig.xml file for FOP: <font metrics-file="$FULLPATH/arialuni.xml" kerning="yes" embed-file="$FULLPATH/ARIALUNI.TTF"> <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/> </font> This is my customization layer: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:import href="fo/docbook.xsl"/> <xsl:template match="symbol[@role = 'unicodefont']"> <fo:inline font-family="ArialUnicodeMS"> <xsl:call-template name="inline.charseq"/> </fo:inline> </xsl:template> </xsl:stylesheet> This is in my source DocBook XML file: <symbol role="unicodefont">♮</symbol> Thank you! -- Don ----- Original Message ----- From: "Bob Stayton" <bobs@sagehill.net> To: "Don Adams" <dga@sgi.com>; <docbook-apps@lists.oasis-open.org> Sent: Thursday, June 16, 2005 10:23 AM Subject: Re: [docbook-apps] Publishing Character Entities (%isopub;) in PDF from DocBook XML > FOP has to be told to use the font for those characters. It won't > automatically use it. The example here shows how to customize it for Symbol > font, but you would use Arial Unicode MS for the font-family instead: > > http://www.sagehill.net/docbookxsl/SpecialChars.html#SwitchSymbol > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Don Adams" <dga@sgi.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Thursday, June 16, 2005 8:02 AM > Subject: Re: [docbook-apps] Publishing Character Entities (%isopub;) in PDF > from DocBook XML > > > > > > I have not been able to solve this problem. Just > > in case someone searches for this information, or you > > can see a mistake I've made, here is what I've tried so far. > > > > I located the ArialUnicodeMS true-type font file > > on a Windows system. This file was > > C:\WINNT\Fonts\ARIALUNI.TTF on that system. > > > > I copied this TTF file to a different directory > > on a Linux system. > > > > I entered the Java command based on the "TrueType Font Metrics" > > information on this web page: > > > > http://xml.apache.org/fop/fonts.html > > > > (Note: in this E-mail, I've substituted "$FULLPATH" for the > > actual path I used in order to help simplify the information.) > > > > $FULLPATH/j2re1.4.2_03/bin/java -Xms512m -Xmx512m -classpath > > "$FULLPATH/fop/fop-0.20.5/lib/xml-apis.jar: > > $FULLPATHfop/fop-0.20.5/lib/xercesImpl2.2.1.jar: > > $FULLPATH/fop/fop-0.20.5/lib/xalan-2.4.1.jar: > > $FULLPATH/fop/fop-0.20.5/lib/batik.jar: > > $FULLPATH/fop/fop-0.20.5/lib/avalon-framework-cvs20020806.jar: > > $FULLPATH/fop/fop-0.20.5/build/fop.jar: > > $FULLPATH/fop/fop-0.20.5/lib/avalonframework.jar: > > $FULLPATH/fop/fop-0.20.5/lib/xml-apis.jar:" > > org.apache.fop.fonts.apps.TTFReader > > $FULLPATH/ARIALUNI.TTF arialuni.xml > > > > Here is the output TTFReader created during the process: > > -------------------------------------------------- > > > > Reading $FULLPATH/ARIALUNI.TTF... > > > > Number of glyphs in font: 50377 > > Postscript format 3 > > Creating xml font file... > > > > Creating CID encoded metrics > > Writing xml font file arualuni.xml... > > > > This font contains no embedding license restrictions > > > > ---------------------------------------------------- > > > > > > Then I added the following to the > > $FULLPATH/fop/fop-0.20.5/conf/userconfig.xml file > > > > <font metrics-file="$FULLPATH/arialuni.xml" kerning="yes" > > embed-file="$FULLPATH/ARIALUNI.TTF"> > > <font-triplet name="Arial" style="normal" weight="normal"/> > > <font-triplet name="ArialMT" style="normal" weight="normal"/> > > <font-triplet name="Times New Roman" style="normal" weight="normal"/> > > <font-triplet name="Times" style="normal" weight="normal"/> > > <font-triplet name="Times-Roman" style="normal" weight="normal"/> > > </font> > > > > Then I added the -c $FULLPATH/userconfig.xml option to > > org.apache.fop.apps.Fop > > > > Nothing has changed in my PDF output. When I do a File -> > > Document Properties -> Fonts in Acrobat Reader, it says > > the fonts used in the document are: > > > > Helvetica-Bold > > Times-Roman > > Helvetica > > Times-Italic > > Times-Bold > > > > The Sharp, Flat, and Natural characters are normal pound > > sign characters in, what looks like to me, Times-Roman font. > > > > Then I tried adding the following to userconfig.xml: > > > > <font metrics-file="$FULLPATH/arialuni.xml" kerning="yes" > > embed-file="$FULLPATH/ARIALUNI.TTF"> > > <font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/> > > </font> > > > > with the same results. > > > > -- > > Don > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]