xsl fo - XSL-FO: how to add "helvetica neue" fonts and output to pdf -
am correct it's not possible use fonts windows 7 c:\windows\fonts* when using xsl-fo (apache fop) generate pdf?
i've installed "helvetica neue" font in otf format.
according https://xmlgraphics.apache.org/fop/trunk/fonts.html
"support system fonts relies on java awt subsystem font metric information. through operating system registration, awt subsystem knows fonts available on system, , font metrics each one.
when working renderers supports system fonts (see above table) , you're missing font, can install in operating system , should available these renderers. please note not true output formats, such pdf or postscript, support custom fonts."
if understanding correct, it's saying if render pdf (meaning output pdf??), can't access fonts through awt/os, therefore, won't able generate text such fonts in pdf using the windows 7 fonts?
------------------------------update, works ttf font, not otf. not sure how can otf fonts work.
-----------------------------update: 20150402:
using fop 1.1:
i downloaded particular free helvetica neue font from: http://www.ephifonts.com/free-helvetica-font-helvetica-neue.html
i configured fop use fop.xconf i'm getting error processing ttf file, , don't know how edit font ttf file fontforge:
fop -c fop.xconf -xml xml.xml -xsl coversheet.xsl -pdf output.pdf
apr 2, 2015 6:53:55 pm org.apache.fop.fonts.truetype.ttffile readcmap severe: unsupported truetype font: no unicode or symbol cmap table not present. aborting apr 2, 2015 6:53:55 pm org.apache.fop.events.loggingeventlistener processevent warning: unable load font file: file:/c:/windows/fonts/helveticaneue.ttf. reason: java.io.ioexception: truetype font not supported: file:/c:/windows/fonts/helveticaneue.ttf apr 2, 2015 6:53:55 pm org.apache.fop.fonts.truetype.ttffile getttcnames info: truetype collection file 4 fonts thanks
(preliminary disclosure: i'm fop developer)
am correct it's not possible use fonts windows 7 c:\windows\fonts* when using xsl-fo (apache fop) generate pdf?
fonts need configured in order recognised , used fop, configuration can really simple: can tell fop @ font files in specific directory (even recursively), or font in "usual" places.
this configuration fragment taken same font configuration page linked in question:
<renderers> <renderer mime="application/pdf"> <fonts> <!-- register fonts found in directory --> <directory>c:\myfonts1</directory> <!-- register fonts found in directory , of sub directories (use care) --> <directory recursive="true">c:\myfonts2</directory> <!-- automatically detect operating system installed fonts --> <auto-detect/> </fonts> </renderer> </renderers> you can find additional details concerning font configuration in this answer.
update, works ttf font, not otf. not sure how can otf fonts work.
opentype fonts support has been added version 2.0.
Comments
Post a Comment