<div dir="ltr"><div><div>This is getting a bit off topic but there is related question I would like get feedback on. Currently, perhaps for some historic reason, x3dom centers all text at the local origin by default, like justify='"MIDDLE" "MIDDLE"' for single line text. It does that also for left aligned multi-line text, eg. it centers the bounding box of the complete text box at the origin. <br><br>I believe that kind of alignment cannot be represented with a justify value although it seems actually what may be expected not unreasonably by some as a default positioning. '"MIDDLE" "MIDDLE"' for multi-line text would center the box at the origin but at the same time also center all lines for a middle alignment. Currently this positioning can only be achieved by using a transform around the text and routing x-offsets into it. Even some scripting is required for the simple math involved.<br><br></div>What this means is that perhaps a third value for the MFString justify field would be needed,dealing with 'absolute' positioning of the major (x) axis, similar to minor alignment. There may be a way to make this backwards compatible as well.<br><br></div>Andreas<br><div><div><br><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 11, 2015 at 8:26 AM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>as I looked into the 'length' and 'maxExtent' fields of the text node, I noticed similar issues with snapshots for the NIST conformance example scenes. For those fields it turns out that they are not widely supported in players, sofar only BS Contact seems to have support while freeWrl, view3dscene and InstantPlayer do not.<br><br></div>I think both 'length' and 'maxExtent' could be implemented for x3dom due to the way it renders text. 'length' is very similar to the maxWidth parameter of ctx.fillText() for canvas, and maxExtent is defining a texture mapping.<br><br></div>Andreas<br><div><div><br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 5:07 PM, Roy Walmsley <span dir="ltr"><<a href="mailto:roy.walmsley@ntlworld.com" target="_blank">roy.walmsley@ntlworld.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Andreas,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for the  update. Perhaps all it needs is for the snapshot to be regenerated, and also the first slide in the show.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Roy<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> Andreas Plesch [mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>] <br><b>Sent:</b> 09 September 2015 21:43<br><b>To:</b> Roy Walmsley<br><b>Cc:</b> X3D Graphics public mailing list<br><b>Subject:</b> Re: [x3d-public] text minor alignment<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hello Roy,<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p></div><p class="MsoNormal">Andreas<u></u><u></u></p><div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Wed, Sep 9, 2015 at 8:14 AM, Roy Walmsley <<a href="mailto:roy.walmsley@ntlworld.com" target="_blank">roy.walmsley@ntlworld.com</a>> wrote:<u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Andreas,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I have reviewed your comments below and find that I am in agreement with you.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">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.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Great catch. Thank you.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Roy</span></p><div><div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"> <span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p></div><span class="HOEnZb"><font color="#888888"><p class="MsoNormal">-- <u></u><u></u></p><div><p class="MsoNormal">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453<u></u><u></u></p></div></font></span></div></div></div></div></div><span class="HOEnZb"><font color="#888888"><p class="MsoNormal"><br></p></font></span></div></div></div></blockquote></div></div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div>