title: XSL-FO: how to add "helvetica neue" fonts and output to pdf
body: <p>Am I correct that it's not possible to use fonts from windows 7 c:\windows\fonts* when using XSL-FO (Apache FOP) to generate a pdf?</p>
  
  <p>I've just installed the "helvetica neue" font in OTF format.</p>
  
  <p>According to 
  <a href="https://xmlgraphics.apache.org/fop/trunk/fonts.html" rel="nofollow">https://xmlgraphics.apache.org/fop/trunk/fonts.html</a></p>
  
  <p>"Support for system fonts relies on the Java AWT subsystem for font metric information. Through operating system registration, the AWT subsystem knows what fonts are available on the system, and the font metrics for each one.</p>
  
  <p>When working with renderers that supports system fonts (see above table) and you're missing a font, you can just install it in your operating system and it should be available for these renderers. Please note that this is not true for output formats, such as PDF or PostScript, that only support custom fonts."</p>
  
  <p>If my understanding is correct, it's saying that if my render is PDF (meaning output is pdf??), then I can't access the fonts through AWT/OS, therefore, I won't be able to generate the text with such fonts in PDF using the the windows 7 fonts?</p>
  
  <p>------------------------------Update, this works only for ttf font, not otf.
  Not sure how I can get otf fonts to work.</p>
  
  <p>-----------------------------update: 20150402:</p>
  
  <p>Using FOP 1.1:</p>
  
  <p>I downloaded this particular free helvetica neue font from:
  <a href="http://www.ephifonts.com/free-helvetica-font-helvetica-neue.html" rel="nofollow">http://www.ephifonts.com/free-helvetica-font-helvetica-neue.html</a></p>
  
  <p>I configured fop to use fop.xconf but I'm getting an error processing the ttf file, and I don't know how to edit the font ttf file with fontforge:</p>
  
  <p>fop -c fop.xconf -xml xml.xml -xsl coversheet.xsl -pdf output.pdf</p>
  
  <pre><code>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 to load font file: file:/C:/windows/FONTS/HelveticaNeue.ttf. Reason: java.io.IOException: TrueType font is not supported: file:/C:/windows/FONTS/HelveticaNeue.ttf
  
  Apr 2, 2015 6:53:55 PM org.apache.fop.fonts.truetype.TTFFile getTTCnames
  INFO: This is a TrueType collection file with 4 fonts
  </code></pre>
  
  <p>Thanks</p>