[x3d-public] Fwd: FontStyle updates, accessType inputOutput (was: X3D4 Architecture validation and implementation update, with thanks)

Don Brutzman brutzman at nps.edu
Tue Jan 19 17:13:05 PST 2021


1. Nicholas and I had an interesting discussion today about this topic.

He pointed out that we might use Text style for all CSS, and FontStyle simply for X3D-native styling.

First impression: this further deconflicts and detangles issues in a great way.  Conceptually, HTML presentation doesn't need a FontStyle style if the Text node is already applying CSS styles.

Note CSS remains optional.

2. Perhaps not clear is ScreenFontStyle.  From specification:

==============================
36.4.4 ScreenFontStyle
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/Part01/components/layout.html#ScreenFontStyle

ScreenFontStyle : X3DFontStyleNode {
   SFNode   [in,out] metadata    NULL    [X3DMetadataObject]
   MFString []       family      "SERIF"
   SFBool   []       horizontal  TRUE
   MFString []       justify     "BEGIN" ["BEGIN","END","FIRST","MIDDLE",""]
   SFString []       language    ""
   SFBool   []       leftToRight TRUE
   SFFloat  []       pointSize   12.0    (0,∞)
   SFFloat  []       spacing     1.0     [0,∞)
   SFString []       style       "PLAIN" ["PLAIN"|"BOLD"|"ITALIC"|"BOLDITALIC"|""]
   SFBool   []       topToBottom TRUE
}

The ScreenFontStyle node specifies fonts styles in terms of the characteristics of a particular surface upon which the text is to be rendered.

The fields in the ScreenFontStyle node are the same as those in the FontStyle node with a single exception:  the size field of the FontStyle node is replaced with a pointSize field. The pointSize field specifies the size of text in points. Thus, the distance between the baseline of each line of text is (spacing  × pointSize) in the appropriate direction.

Each glyph of the text should be rendered as a quadrilateral with texture applied. The texture for each character shall be generated using the specified font and font attributes. The texture shall have an alpha component whose alpha value shall be derived from the anti-aliasing feature of the glyph. Rendering should occur with bi-linear filtering turned off for best results.

Otherwise, the attributes are as specified in 15.4.1 FontStyle.
===============================

a. To avoid ambiguity regarding layout or local geometry, suggest we change

	"characteristics of a particular surface"
to
	"characteristics of a particular display surface"

b. Requiring textures just seems wrong.  Other fonts ought to be allowed, display technique should be up to the X3D player.

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



More information about the x3d-public mailing list