<div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#t-horizontalTRUE">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#t-horizontalTRUE</a><br></div><div><br></div><div>where the different colors of the origin symbols signify minor alignment types.</div><div><br></div><div>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 ?</div><div><br></div><div>[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.]</div><div><br></div><div>If my understanding is correct, the rendering of a default text node in a scene such as</div><div><br></div><div><a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_pages/page01.html">http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_pages/page01.html</a><br></div><div><br></div>should more or less look like this:<div><br></div><div><a href="http://andreasplesch.github.io/x3dom/x3dom_text/alignment.xhtml">http://andreasplesch.github.io/x3dom/x3dom_text/alignment.xhtml</a></div><div><br></div><div>eg., the first line should be above the x-axis (green line).</div><div><br></div><div>However, the snapshot provided with scene in the web3d archive here</div><div><br></div><div><a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_viewpoints/default.x3d._VP_Test_default_FontStyle_rendering.png">http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_viewpoints/default.x3d._VP_Test_default_FontStyle_rendering.png</a><br></div><div><br></div><div>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.</div><div><br></div><div>I may also try other browsers with the scene to see how they interprete the default positioning of a text node.</div><div><br></div><div>Thanks for any input,</div><div><br></div><div>Andreas</div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>