Hey J.Pietschmann, Yes, I did notice that today as i was working on the xml file... one tutorial on internet had 2 slashes, doh. Also <directory> unusually doesn't seem to take filenames like file:///c:/fop but just c:/fop.
Looks like it was my problem of trying to do the xml file from scratch, guess I didn't provide some default values... I figured out the default conf file is in conf/ and modified that by adding my font code and then calling that custom xml on command line. Here are options that worked: 1. auto-detecting system fonts <auto-detect/> worked, but gave a bunch of warnings about other fonts/and true-type collections which need font-metrics it seems, which would be kinda annoying. Rather just use a few fonts and specify them to not get these warnings... 2. auto-detecting fonts in custom dirs Putting the specific fonts I want to use in their own directory via <directory recursive="true">file:///C:/dev/fop/config/fonts</directory> did not work at all. Realized it needs different format than the other how specified font-metrics abs filenames ... This works: <directory recursive="true">C:/dev/fop/config/fonts</directory> 3. creating font-metrics file: Not needed if doing above step, but still an option. I prefer doing step 2, followed by 3, and step 1 as my last option even though its convenient. <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_normal_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALN.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="normal" weight="normal"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_italics_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALNI.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="italic" weight="normal"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_bold_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALNB.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="normal" weight="bold"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/capacitor_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/CAPACITR.ttf" kerning="yes"> <font-triplet name="Capacitor" style="normal" weight="normal"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/capacitor_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/CAPACITR.ttf" kerning="yes"> <font-triplet name="Capacitor" style="normal" weight="normal"/> </font> Here is my whole font file: <fonts> <!-- embedded fonts --> <!-- This information must exactly match the font specified in the fo file. Otherwise it will use a default font. For example, <fo:inline font-family="Arial" font-weight="bold" font-style="normal"> Arial-normal-normal font </fo:inline> for the font triplet specified by: <font-triplet name="Arial" style="normal" weight="bold"/> If you do not want to embed the font in the pdf document then do not include the "embed-url" attribute. The font will be needed where the document is viewed for it to be displayed properly. possible styles: normal | italic | oblique | backslant possible weights: normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 (normal = 400, bold = 700) --> <!-- <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_normal_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALN.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="normal" weight="normal"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_italics_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALNI.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="italic" weight="normal"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/arial_narrow_bold_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/ARIALNB.TTF" kerning="yes"> <font-triplet name="Arial Narrow" style="normal" weight="bold"/> </font> <font metrics-url="file:///C:/dev/fop/config/font-metric-files/capacitor_ttf.xml" embed-url="file:///C:/dev/fop/config/fonts/CAPACITR.ttf" kerning="yes"> <font-triplet name="Capacitor" style="normal" weight="normal"/> </font> --> <directory recursive="true">C:/dev/fop/config/fonts</directory> <!-- automatically detect operating system installed fonts <auto-detect/> --> </fonts> > Technically, these are not valid file URLs. Try > metrics-url="file:///C:/dev/fop/config/font-metric... > ^^^ three slashes here --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org