You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Eliot Kimber <ek...@innodata-isogen.com> on 2004/01/08 22:13:56 UTC

Non-AWT-based FontMetrics

I was, for some reason, under the impression that there was a 
java.awt.FontMetrics implementation that did not delegate to the 
built-in Graphics2D AWT font metrics. But now I can't find anything 
except the org.apache.fop.render.awt.AWTFontMetrics class.

I see that the PostScript renderer is using the AWT font metrics. So 
does this mean that there is no FontMetrics implementation that uses the 
XML font metrics files?

Thanks,

Eliot
-- 
W. Eliot Kimber
Professional Services
Innodata Isogen
9030 Research Blvd, #410
Austin, TX 78758
(512) 372-8122

eliot@innodata-isogen.com
www.innodata-isogen.com



Re: Non-AWT-based FontMetrics

Posted by Jeremias Maerki <de...@greenmail.ch>.
I'm afraid you got it wrong. Talking about HEAD now: The AWT renderer
in HEAD is non-functional ATM. What you need to look at is
SingleByteFont (ex. Type 1) and MultiByteFont (ex. TTF) in the
org.apache.fop.fonts package. Both classes implement the FontMetrics
interface which lets you access glyph widths. FontReader is the class
that loads the XML font metrics.

The PostScript renderer is not using AWT font metrics. It uses the
metrics coming from the Single/MultiByteFonts as does the PDF renderer.

I hope this helps.

On 08.01.2004 22:13:56 Eliot Kimber wrote:
> I was, for some reason, under the impression that there was a 
> java.awt.FontMetrics implementation that did not delegate to the 
> built-in Graphics2D AWT font metrics. But now I can't find anything 
> except the org.apache.fop.render.awt.AWTFontMetrics class.
> 
> I see that the PostScript renderer is using the AWT font metrics. So 
> does this mean that there is no FontMetrics implementation that uses the 
> XML font metrics files?


Jeremias Maerki