Jeremias Maerki wrote:
On 13.04.2004 14:47:02 Peter B. West wrote:

My reading of the Javadocs for both 1.4.2 and 1.3.1 has turned up some interesting questions. Since 1.3.1 (at least), java.awt.Font has defined constants for CENTER_BASELINE, HANGING_BASELINE and ROMAN_BASELINE. These correspond to the Central, Hanging and Alphabetic baselines of the Rec at 7.8.1 Fonts and Font Data, which includes:
<quote>
XSL assumes that the font tables will provide at least three font characteristics: an ascent, a descent and a set of baseline-tables.
</quote>
...
Does the baseline discussion in the Rec have any echo in FOP? Are baseline tables implemented?


No idea and I don't think so. Up to date we are lucky to have
non-ISO-8859-1 characters display at all. I think Keiron started working
on BIDI, and Karen had quite some knowledge, too. But I don't think it
got any farther than that.

We've got the ascender, the descender, the X/Cap-height and that's the
three values that determine the placement of characters right now. See
FontMetrics.java.


Mind you, I don't yet know whether the baseline constants from Java are actually used anywhere.


Neither do I, but trusting Eclipse's reference search, the answer is: no,
they aren't in use, not even in JDK 1.4.

Jeremias,


I dug around in the API docs a bit more and found that the BASELINE constants are used in both 1.3.1 and 1.4.*. See http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Font.html#getBaselineFor(char)
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/font/LineMetrics.html#getBaselineIndex()
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/font/LineMetrics.html#getBaselineOffsets()


There are corresponding entries for 1.3.1.
http://java.sun.com/j2se/1.3/docs/api/java/awt/Font.html#getBaselineFor(char)
http://java.sun.com/j2se/1.3/docs/api/java/awt/font/LineMetrics.html#getBaselineIndex()
http://java.sun.com/j2se/1.3/docs/api/java/awt/font/LineMetrics.html#getBaselineOffsets()

Peter
--
Peter B. West <http://www.powerup.com.au/~pbwest/resume.html>

Reply via email to