[x3d-public] text minor alignment fixed in Xj3D and slideshow figure

Don Brutzman brutzman at nps.edu
Wed Sep 30 20:05:33 PDT 2015


cc: source list

Am happy to report that Terry Norbraten fixed the problem in the Xj3D codebase today - an incorrect default value was being used for Text minor alignment in the underlying Aviatrix3D render engine.  Very impressive correction.

Corrected results uploaded, test image also attached.

http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/default.x3d
http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/default.html
http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/ConformanceNistAppearanceFontStyleDefaultDefaultMultipleBrowsers.png
http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/viewpointSlideshow.html


On 9/9/2015 2:07 PM, Roy Walmsley wrote:
> Andreas,
>
> Thanks for the  update. Perhaps all it needs is for the snapshot to be regenerated, and also the first slide in the show.
>
> Roy
>
> *From:*Andreas Plesch [mailto:andreasplesch at gmail.com]
> *Sent:* 09 September 2015 21:43
> *To:* Roy Walmsley
> *Cc:* X3D Graphics public mailing list
> *Subject:* Re: [x3d-public] text minor alignment
>
> Hello Roy,
>
> thanks for reviewing this issue. In the mean time I had opportunity to view the scene with freeWrl and InstantPlayer. Both render the scene as expected, eg. with the first line above the x-axis while its baseline just touches it. So I think something was a bit off when the snapshot on the archive web site was generated.
>
> Andreas
>
> On Wed, Sep 9, 2015 at 8:14 AM, Roy Walmsley <roy.walmsley at ntlworld.com <mailto:roy.walmsley at ntlworld.com>> wrote:
>
> Andreas,
>
> I have reviewed your comments below and find that I am in agreement with you.
>
> You are correct in saying that the default for the /justify/ field is [“BEGIN” “FIRST”]. This is quite clearly stated in 15.2.2.3 of the 19775-1 specification.
>
> Then, when /horizontal/ is TRUE and /topToBottom/ is TRUE, which both are by default, Table 15.4 in the 19775-1 specification states that when the minor alignment is “FIRST” the baseline of the first line shall be aligned with the origin.
>
> The inevitable conclusion is that the figure displaying the NIST Conformance for the default field settings is incorrect. I will raise this issue for discussion at the next available opportunity. Please keep us informed of any further findings.
>
> Great catch. Thank you.
>
> Regards,
>
> Roy
>
> *From:*x3d-public [mailto:x3d-public-bounces at web3d.org <mailto:x3d-public-bounces at web3d.org>] *On Behalf Of *Andreas Plesch
> *Sent:* 09 September 2015 00:03
> *To:* X3D Graphics public mailing list
> *Subject:* [x3d-public] text minor alignment
>
> 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
>
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#t-horizontalTRUE
>
> where the different colors of the origin symbols signify minor alignment types.
>
> 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
>
> http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_pages/page01.html
>
> should more or less look like this:
>
> http://andreasplesch.github.io/x3dom/x3dom_text/alignment.xhtml
>
> eg., the first line should be above the x-axis (green line).
>
> However, the snapshot provided with scene in the web3d archive here
>
> http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/FontStyle/_viewpoints/default.x3d._VP_Test_default_FontStyle_rendering.png
>
> 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 interpret the default positioning of a text node.
>
> Thanks for any input,
>
> Andreas
>
> --
>
> Andreas Plesch
> 39 Barbara Rd.
> Waltham, MA 02453

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConformanceNistAppearanceFontStyleDefaultDefaultMultipleBrowsers.png
Type: image/png
Size: 238475 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150930/cf271f3e/attachment-0001.png>


More information about the x3d-public mailing list