xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Font naming and fonts used in SVG external graphics
Date Wed, 06 Feb 2008 15:36:38 GMT
I'm not sure what you're doing wrong but FOP Trunk works fine for me
(svgtext.fo + text.svg) except for the following:
- The STIXGeneral I have has CFF glyphs which don't work with FOP.
- The Nimbus fonts I have (from GhostScript) don't even install in WinXP
so I can't test that. [1]

[1] There is a restriction for Type 1 fonts until we can parse AFM or
PFB files as the PFM file we use for font metrics doesn't contain the
right font name we need for auto-configuration.

I've attached the PDF I generated with the latest FOP Trunk and the
config file I used (all fonts are installed in my WinXP). Maybe you're
on a Unix which may behave differently for some reason. But I can't test
that. But if Batik Squiggle displays the SVG fine then it can't be that.

I've been able to invest a lot of time last October to make text
painting in SVG near-perfect. Furthermore, I've invested some work to
make font-auto-registration better. It now properly registers (TrueType)
fonts with names including spaces. If that doesn't happen at your end I
have to suspect you're not using a current FOP Trunk. Can you please
verify that?

On 05.02.2008 20:26:55 Justus-bulk wrote:
> Hi,
> I've run into the following issue; see
> http://www.intelsig.be/~piater/nobackup/fop/svgfonts/ for the
> accompanying files:
> - I've created a simple file text.svg with Inkscape containing text in
>   different TrueType fonts and three Nimbus Type-1 fonts. It displays
>   OK in Firefox and Batik (squiggle).
> - If I include this file in svgtext.fo and process it with fop
>   (trunk), the resulting svgtext.pdf appears to contain only fonts
>   without spaces in their (Inkscape-assigned) names, with the
>   exception of the Type-1 font Nimbus Sans L, which is included as
>   NimbusSanL-Regu.
>   Fonts whose names contain spaces appear to be typeset using the
>   correct metrics, but the fonts are not embedded in the PDF.
> - I created a file texttext.fo with the same content as text.svg. The
>   resulting texttext.pdf is equivalent to svgtext.pdf.
> - I then removed the spaces in the TTF font names and adapted the
>   Nimbus names in text.svg and texttext.fo, naming the resulting files
>   textfop.svg and texttextfop.fo. The resulting texttextfop.pdf is
>   perfect, but svgtextfop.pdf remains equivalent to svgtext.pdf; no
>   improvement.
>   textfop.svg is still displayed correctly by Inkscape, Firefox and
>   Batik, except for the three Nimbus fonts, and Inkscape's font dialog
>   no longer displays the correct font names for any of the hand-edited
>   font names.
> So, there seem to be two issues that perhaps go back to the same root:
> - Fop does not appear to recognize fonts under the same names as other
>   programs do (Inkscape, but also OpenOffice.org). This appears to be
>   linked to spaces in TTF filenames, but the Nimbus (Type 1) story is
>   slightly different.
> - There seems to be an issue with Fop embedding fonts required by SVG:
>   Font names that both Batik and Fop process correctly are not
>   necessarily processed correctly by Fop if they occur in embedded
>   SVG. (If I add textfop.svg to texttextfop.fo, the resulting SVG text
>   is still broken, even though the fonts are embedded and correctly
>   used by the fo:block text; this is independent on the order of
>   inclusion.)
> Justus

Jeremias Maerki

View raw message