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 Enoch Root <en...@yahoo.com> on 2003/03/03 01:57:17 UTC

replacing default fonts

Hi all;

I've added my own fonts to FOP and have managed to
embed it in a servlet successfully (thanks to FAQ and
list archives.)

I'd like to know if it's possible to replace default
fonts supplied with FOP so that I won't have to read
userconfig.xml in the servlet and supply fonts with my
application?  Or is it possible to add just the
missing glyphs for a specific language?

I skimmed the source and looks like fonts within FOP
are generated from src/codegen/*.xml, and decided to
ask if there's an easy way, before delving deeper...

Thanks in advance.


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


Re: embedded problem

Posted by Jeremias Maerki <de...@greenmail.ch>.
Your stuff works here on Windows XP with the latest FOP and using
Acrobat Reader 5.05. The only thing I changed was using Windows-style
filenames and weight="bold" because it's a bold font. But the latter is
probably insignificant.

Try using URLs instead of filenames:
file:/nas/web/fonts/ITCGaraBold.xml
and
file:/nas/web/fonts/GAB_____.PFB

I hope the following (from your log file) has nothing to do with it.
You're planning to supply the italic font as well, aren't you?

> [ERROR] unknown font GaramondBook,italic,normal so defaulted font to any


On 04.03.2003 16:34:21 Lucian Opris wrote:
> Hi,
> I'm using Adobe 5.0
> -Type 1 font
> -previous is 0.20.4
> <font metrics-file="/nas/web/fonts/ITCGaraBold.xml" 
>       kerning="yes" 
>       embed-file="/nas/web/fonts/GAB_____.PFB">
>     <font-triplet name="AGaramondBD" style="normal" weight="normal"/>
> </font>
> fop log see attachment
> Thanks
> 
> Lucian Opris
> 
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> Sent: Tuesday, March 04, 2003 10:06 AM
> To: fop-user@xml.apache.org
> Subject: Re: embedded problem
> 
> 
> - Which program do you use to open the PDF? Acrobat Reader? Which
>   version?
> - Is the Garamond font a TrueType or a Type 1 font?
> - "Previous version": do you refer to 0.20.4?
> - What does the "font" element in userconfig.xml for Garamond look like?
> - What's FOP's log when you generate the PDF?
> 
> From 0.20.4 to 0.20.5 there have been changes in font support but they
> should be backwards-compatible. The only thing that comes to my mind is
> the filenames/URLs referencing the font files. Handling has changed a
> bit.
> 
> On 04.03.2003 15:23:58 Lucian Opris wrote:
> > I'm getting errors when I'm trying to open up a pdf created by
> > fop-20.5rc "cannot extract embedded  Garamond font". It was fine in
> > previous version. I'm using the same userconfig.xml.


Jeremias Maerki


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


RE: embedded problem

Posted by Lucian Opris <lu...@bluematrix.com>.
Hi,
I'm using Adobe 5.0
-Type 1 font
-previous is 0.20.4
<font metrics-file="/nas/web/fonts/ITCGaraBold.xml" 
      kerning="yes" 
      embed-file="/nas/web/fonts/GAB_____.PFB">
    <font-triplet name="AGaramondBD" style="normal" weight="normal"/>
</font>
fop log see attachment
Thanks

Lucian Opris


-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: Tuesday, March 04, 2003 10:06 AM
To: fop-user@xml.apache.org
Subject: Re: embedded problem


- Which program do you use to open the PDF? Acrobat Reader? Which
  version?
- Is the Garamond font a TrueType or a Type 1 font?
- "Previous version": do you refer to 0.20.4?
- What does the "font" element in userconfig.xml for Garamond look like?
- What's FOP's log when you generate the PDF?

>From 0.20.4 to 0.20.5 there have been changes in font support but they
should be backwards-compatible. The only thing that comes to my mind is
the filenames/URLs referencing the font files. Handling has changed a
bit.

On 04.03.2003 15:23:58 Lucian Opris wrote:
> I'm getting errors when I'm trying to open up a pdf created by
> fop-20.5rc "cannot extract embedded  Garamond font". It was fine in
> previous version. I'm using the same userconfig.xml.



Jeremias Maerki


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




Re: embedded problem

Posted by Jeremias Maerki <de...@greenmail.ch>.
- Which program do you use to open the PDF? Acrobat Reader? Which
  version?
- Is the Garamond font a TrueType or a Type 1 font?
- "Previous version": do you refer to 0.20.4?
- What does the "font" element in userconfig.xml for Garamond look like?
- What's FOP's log when you generate the PDF?

From 0.20.4 to 0.20.5 there have been changes in font support but they
should be backwards-compatible. The only thing that comes to my mind is
the filenames/URLs referencing the font files. Handling has changed a
bit.

On 04.03.2003 15:23:58 Lucian Opris wrote:
> I'm getting errors when I'm trying to open up a pdf created by
> fop-20.5rc "cannot extract embedded  Garamond font". It was fine in
> previous version. I'm using the same userconfig.xml.



Jeremias Maerki


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


embedded problem

Posted by Lucian Opris <lu...@bluematrix.com>.
Hi,
I'm getting errors when I'm trying to open up a pdf created by fop-20.5rc "cannot extract embedded  Garamond font". It was fine in previous version. I'm using the same userconfig.xml.
Thanks,
Lucian Opris




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


Re: replacing default fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
I don't see a problem with having the userconfig.xml in the WAR. It's
pretty read-only in there and it's only a one-liner in your code.

If you absolutely want to change the default font setup you should have
a look at org.apache.fop.render.pdf.FontSetup.java. This is where the
default fonts get registered for the PDF renderer. It uses precompiled
fonts that are generated in the "codegen" task in build.xml. You could
also build such Font classes using the same mechanism. That's how font
support used to be years ago. :-) Anyway, I advise against it.

On 03.03.2003 15:14:28 Enoch Root wrote:
> It's not terribly necessary, I'd like just to know if
> it's possible.  And the reason, as I explained below,
> I would like to avoid user configurable stuff (i.e.
> userconfig.xml within WAR) as much as possible.
> 
> --- Oleg Tkachenko <ol...@multiconn.com> wrote:
> > Enoch Root wrote:
> > 
> > > I'd like to know if it's possible to replace
> > default
> > > fonts supplied with FOP so that I won't have to
> > read
> > > userconfig.xml in the servlet and supply fonts
> > with my
> > > application?  Or is it possible to add just the
> > > missing glyphs for a specific language?
> > I don't think it's easy feasible. Why do you need
> > it?


Jeremias Maerki


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


Re: region-start

Posted by Oleg Tkachenko <ol...@multiconn.com>.
J.Pietschmann wrote:

> Looks like a case for
>   http://www.w3.org/TR/xsl/slice7.html#precedence
> 
> I just can't be bothered to remember the details right now, look
> it up yourself.
> 
> Oleg, can you confirm the default behaviour has changed?
Well, it looks ok to me, by default region-before has precedence="false", so 
its ipd is reduced by region-start's extent. Probably it was really changed 
after 0.20.4 was released.
-- 
Oleg Tkachenko
Multiconn Technologies, Israel


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


RE: region-start

Posted by Lucian Opris <lu...@bluematrix.com>.
Thank you, It worked fine.

Lucian Opris







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


Re: region-start

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Lucian Opris wrote:
> Hi, Did anything change in fop 20.5rc for region-start behaviour? Bofore in
> fop 20.4 the region-before wasn't affected by extent attribute of
> region-start. I mean if I have <fo:region-start extent="63mm" ... the header
> will be indented with 63mm. I'd like to have only te body indented not the
> header or footer. Is that possible in the fop 20.5rc? Thanks

Looks like a case for
   http://www.w3.org/TR/xsl/slice7.html#precedence

I just can't be bothered to remember the details right now, look
it up yourself.

Oleg, can you confirm the default behaviour has changed?

J.Pietschmann


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


region-start

Posted by Lucian Opris <lu...@bluematrix.com>.
Hi,
Did anything change in fop 20.5rc for region-start behaviour? Bofore in fop 20.4 the region-before wasn't affected by extent attribute of region-start. I mean if I have <fo:region-start extent="63mm" ... the header will be indented with 63mm. I'd like to have only te body indented not the header or footer. Is that possible in the fop 20.5rc?
Thanks

Lucian Opris




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


SVG scaleable

Posted by Lucian Opris <lu...@bluematrix.com>.
Hi,
Is there a way to scale svg images into wysiwyg editor by draging the image and take the width and height of IMG attributes in editor not the width and height that resides into svg file? I've tried using the width, height,content-width="auto" and content-height="auto" attributes of the fo:external-graphic but I've got no results.
Thanks a lot



Lucian Opris




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


Re: replacing default fonts

Posted by Enoch Root <en...@yahoo.com>.
It's not terribly necessary, I'd like just to know if
it's possible.  And the reason, as I explained below,
I would like to avoid user configurable stuff (i.e.
userconfig.xml within WAR) as much as possible.

--- Oleg Tkachenko <ol...@multiconn.com> wrote:
> Enoch Root wrote:
> 
> > I'd like to know if it's possible to replace
> default
> > fonts supplied with FOP so that I won't have to
> read
> > userconfig.xml in the servlet and supply fonts
> with my
> > application?  Or is it possible to add just the
> > missing glyphs for a specific language?
> I don't think it's easy feasible. Why do you need
> it?
> 
> -- 
> Oleg Tkachenko
> Multiconn Technologies, Israel
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> fop-user-help@xml.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


Re: replacing default fonts

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Enoch Root wrote:

> I'd like to know if it's possible to replace default
> fonts supplied with FOP so that I won't have to read
> userconfig.xml in the servlet and supply fonts with my
> application?  Or is it possible to add just the
> missing glyphs for a specific language?
I don't think it's easy feasible. Why do you need it?

-- 
Oleg Tkachenko
Multiconn Technologies, Israel


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