[x3d-public] text minor alignment

Andreas Plesch andreasplesch at gmail.com
Tue Sep 8 16:02:59 PDT 2015

I am trying to produce more correct text alignment with x3dom, and want to
clarify my understanding of the minor alignment, the second value of the
justify MFString field of the FontStyle node. My main reference is table
15.6 in the spec. at


where the different colors of the origin symbols signify minor alignment

In particular, I understand that 'FIRST' (black) is different from 'BEGIN'
(red) in that 'FIRST' will align the base of the first line with Y=0
(x-axis) while 'BEGIN' will align the top of the first line with Y=0 (in
the topToBottom case). I also understand that 'FIRST' is the default for
minor alignment. Is this correct ?

[I am not quite sure why 'FIRST' is the default since it seems to require
to take into account the size of the used font when accurately positioning
text in a scene. Also, the size of a typeface referred to in its name
refers to a box a bit larger than the distance from the lowest point of any
glyph (say y) to the highest point (say $). This makes it generally hard to
determine where the baseline of a font is just based on its nominal size.]

If my understanding is correct, the rendering of a default text node in a
scene such as


should more or less look like this:


eg., the first line should be above the x-axis (green line).

However, the snapshot provided with scene in the web3d archive here


shows the first line underneath the x-axis, not above. This is where I am
looking for clarification. The x3d browser used for the snapshot (xj3d?)
may or may not faithfully adhere to the spec.

I may also try other browsers with the scene to see how they interprete the
default positioning of a text node.

Thanks for any input,


Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150908/9d1405d0/attachment.html>

More information about the x3d-public mailing list