You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Lev T <gu...@gmail.com> on 2006/03/15 13:01:32 UTC

Unable to use bound fonts in SVG

Hi.

I am creating PDF documents using fop, those documents include embedded fonts 
and SVG images, which use same embedded fonts.

PDF I get does not use selected fonts in SVGs. What do I do wrong ?

Attached files are:
example.fo : Example file with SVG text
example.pdf : PDF built from example.fo with embedded font
userconf.xml : fop configuration file (needed for embedding font)

To run:
1. Create font map (I used comic.ttf font)
# fop-ttfreader fontname.ttf fontname.xml

2. Edit userconf.xml, change font name if you can not locate comic.ttf

3. Run fop:
# fop -c userconf.xml -fo example.fo -pdf example.pdf

-- 
Regards,
Lev T.

Re: Unable to use bound fonts in SVG

Posted by Lev T <gu...@gmail.com>.
Hi

The issue was solved with simply adding
this section:

  <entry>
    <key>strokeSVGText</key>
     <value>false</value>
  </entry>

How did I not found it here:
http://xmlgraphics.apache.org/fop/0.20.5/configuration.html

I don`t know :)


On Wednesday 15 March 2006 16:57 pm, Jeremias Maerki wrote:
> There are limits to what degree FOP can control the use of fonts inside
> SVG. Certain text elements are always painted as shapes instead of as
> text. It depends on the FOP and Batik version in use. In the case that
> FOP can't control text painting, Batik does it with the help of the
> Java2D/AWT subsystem. That means you need to make the font available to
> the Java2D/AWT subsystem by installing the font in your operating system
> and/or your JRE. You will also need to make sure you use the font-family
> name that Java presents the installed font under, otherwise it will be
> subsituted.
>
> On 15.03.2006 13:01:32 Lev T wrote:
> > Hi.
> >
> > I am creating PDF documents using fop, those documents include embedded
> > fonts and SVG images, which use same embedded fonts.
> >
> > PDF I get does not use selected fonts in SVGs. What do I do wrong ?
> >
> > Attached files are:
> > example.fo : Example file with SVG text
> > example.pdf : PDF built from example.fo with embedded font
> > userconf.xml : fop configuration file (needed for embedding font)
> >
> > To run:
> > 1. Create font map (I used comic.ttf font)
> > # fop-ttfreader fontname.ttf fontname.xml
> >
> > 2. Edit userconf.xml, change font name if you can not locate comic.ttf
> >
> > 3. Run fop:
> > # fop -c userconf.xml -fo example.fo -pdf example.pdf
> >
> > --
> > Regards,
> > Lev T.
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

-- 
Regards,
Lev T.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Unable to use bound fonts in SVG

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
There are limits to what degree FOP can control the use of fonts inside
SVG. Certain text elements are always painted as shapes instead of as
text. It depends on the FOP and Batik version in use. In the case that
FOP can't control text painting, Batik does it with the help of the
Java2D/AWT subsystem. That means you need to make the font available to
the Java2D/AWT subsystem by installing the font in your operating system
and/or your JRE. You will also need to make sure you use the font-family
name that Java presents the installed font under, otherwise it will be
subsituted.

On 15.03.2006 13:01:32 Lev T wrote:
> Hi.
> 
> I am creating PDF documents using fop, those documents include embedded fonts 
> and SVG images, which use same embedded fonts.
> 
> PDF I get does not use selected fonts in SVGs. What do I do wrong ?
> 
> Attached files are:
> example.fo : Example file with SVG text
> example.pdf : PDF built from example.fo with embedded font
> userconf.xml : fop configuration file (needed for embedding font)
> 
> To run:
> 1. Create font map (I used comic.ttf font)
> # fop-ttfreader fontname.ttf fontname.xml
> 
> 2. Edit userconf.xml, change font name if you can not locate comic.ttf
> 
> 3. Run fop:
> # fop -c userconf.xml -fo example.fo -pdf example.pdf
> 
> -- 
> Regards,
> Lev T.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org