Peter B. West wrote:

Validation issues considered in alt-design circa 2002. See CountryLanguageScript.java in the alt-design code for an attempt at this. Generated from xml-lang.xml and xml-lang.xsl. No baselines.

Incidentally, I decided the language and country components of this were
somewhat redundant when I discovered the scope of java.util.Locale.
Somewhat, but not entirely.  Script is not covered there, but Joerg has
pointed out that there is a basis in java.lang.Character.UnicodeBlock.
Again, not entirely.

That's one of the reasons I have decided to rely extensively on Java facilities. Here's another.

java.awt.font.TextLayout, including
byte getBaseline()
 Returns the baseline for this TextLayout
float[] getBaselineOffsets()
 Returns the offsets array for the baselines used for this TextLayout.

Where currently supported baselines are given in java.awt.Font as CENTER_BASELINE, HANGING_BASELINE and ROMAN_BASELINE.

For use with embedded graphic elements you have java.awt.font.GraphicAttribute and java.awt.font.ShapeGraphicAttribute which also define TOP_ALIGNMENT and BOTTOM_ALIGNMENT.

That's enough to be getting on with. Obviously, these baselines are built-in attributes of the text. My assumption is that this coverage will continue to improve, especially if the requirement is made known through the Java Community Process.

Peter
--
Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to