The "justify" field of the FontStyle node "determines whether the Text string starting position (0 0 0) is at the beginning, end, or middle. Two string values are provided for defining the major and minor axis alignments."
(quote from "X3D: Extensible 3D Graphics for Web Authors", an example can be found at http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter05-AppearanceMaterialTextures/_pages/page12.html ).
But your code uses only the first string, controlling the major direction (i.e. horizontal, since you do not support altering horizontal, leftToRight, topToBottom fields from default settings). The second string, responsible for vertical position, is ignored.
The text in the attached model is shown above the red line by view3dscene, but InstantPlayer and H3DViewer show it (correctly, I believe) centered around it.
Confirmed, the vertical "justify" is simply not implemented yet. I hope to reimplement VRML/X3D Text rendering for the next release of view3dscene (and Castle Game Engine), and I'll tackle this too :) Will make a note in this ticket when it happens :)
Thanks for the report!
Last edit: Michalis Kamburelis 2014-11-13
You wrote: the vertical "justify" is simply not implemented yet.
Please, put that information into
http://castle-engine.sourceforge.net/x3d_implementation_text.php .
BTW, what is the release schedule, if any?
Done :)
As soon as possible :)
1. The main release point, which is Spine integration, is practically finished now. See https://sourceforge.net/p/castle-engine/wiki/Spine/ .
2. The 2nd release point, which is our new build tool, is near finish (it remains to finish easy Android packaging). See https://sourceforge.net/p/castle-engine/wiki/Build%20tool/ .
3. And the 3rd release point is the text rendering. This is not started yet. It should be a matter of 1 weekend of work.
It's not a lot of work, but in practice it will take some time, since my daily job occupies some time lately :) It should happen within 3-4 weeks. In the worst case, it will still happen in 2014.
FYI, the new font rendering implementaton is already here :) See latest news on FB or G+: https://www.facebook.com/castleengine , https://plus.google.com/b/101185352355602218697/101185352355602218697/posts .
I'll tackle this ticket very soon, and the next release will also happen soon.
Done :) FontStyle.justify[1] for minor justification (vertical) is supported now. Testcase is on http://svn.code.sf.net/p/castle-engine/code/trunk/demo_models/text/text_justify.x3dv .
If you want to try the new version now, it will be available within 15 minutes on http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/ :)