[x3d-public] draft X3D 4.1 prose for font files and libraries

Michalis Kamburelis michalis.kambi at gmail.com
Fri Feb 28 20:52:24 PST 2025


As for FontLibrary,
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/text.html#FontLibrary
: I admit I don't understand this proposal (yet).

1. Where is the FontLibrary actually used? It doesn't seem you can refer to
a FontLibrary node in any way. It's also not X3DChildNode, so you cannot
just place it in groups.

2. The sentence """If present, only the first active font library retrieved
from the url list shall be used."""" --- What is the meaning of word "used"
in this sentence? Used for what?

3. """Individual font library files can be used by multiple FontStyle nodes
in a scene.""" -- How? FontStyle does not refer to FontLibrary. And I
understand in this version, FontStyle would not have its own FontStyle.url
field.

     Did you maybe want to add a field like "SFNode FontLibrary
fontLibrary" to FontStyle or Text? Or make FontLibrary a X3DChildNode?

4. A testcase, preferably many testcase(s), explaining the FontLibrary
usage (X3D files + intended rendering) would very helpful. (Same goes for
the previous proposal actually.) Please provide testcases along with spec
prose -- they make the intention more obvious.

Overall, so far, I admit FontLibrary is confusing to me, I don't know what
it means. The previous proposal (extending FontStyle) seems more
straightforward -- a few people (including me) had feedback, but it seems
that we all "got the intention" of FontStyle.url correctly, we just pointed
some things to improve in wording.

Regards,
Michalis


pt., 28 lut 2025 o 19:56 Brutzman, Donald (Don) (CIV) via x3d-public <
x3d-public at web3d.org> napisał(a):

> Thanks everyone for responses, implementation improvements, technical
> details, and many insights.
>
> First positive takeaway:  WOFF File Format 2.0 is the clear preference to
> WOFF 1.0.
>
> WOFF File Format 2.0, W3C Recommendation, 08 August 2024
>
>    - "Abstract.  Based on experience with WOFF 1.0, which is widely
>    deployed, this specification was developed to provide improved compression
>    and thus lower use of network bandwidth, while still allowing fast
>    decompression even on mobile devices. This is achieved by combining a
>    content-aware preprocessing step and improved entropy coding, compared to
>    the Flate compression used in WOFF 1.0."
>    - https://www.w3.org/TR/WOFF2
>
> Clearly, from recent excellent emails, there are many implementer-specific
> issues and interactions when adding font files that are good to know about,
> but don't necessarily need to be expressed in an X3D model (or the X3D
> Architecture specification).
>
> Dick and I worked further today to assess whether separation of font files
> from FontStyle node into a FontLibrary node was the preferred to represent
> this information in an X3D model.  We also repeated WOFF Recommendation's
> use of term "collection" as part of a *FontLibrary *definition.
>
>    - The FontLibrary node specifies a collection of one or more font
>    family definitions. A font family may include one or more related font
>    style definitions. FontLibrary provides the ability to selectively load
>    font files for use by FontStyle
>    <https://outlook.office.com/mail/id/AAkALgAAAAAAHYQDEapmEc2byACqAC%2FEWg0AN5ikByHYYkeveIfklhUi1gAG%2Blh21AAA?nativeVersion=1.2025.219.400#FontStyle> and
>    ScreenFontStyle
>    <https://outlook.office.com/mail/id/layout.html#ScreenFontStyle> nodes.
>
> FontLibrary node pros (meaning separation of font files from FontStyle
> node):
>
>    - Keeps existing (and fairly complex) FontStyle implementations
>    unchanged
>    - Separation of loading and presentation functionality between two
>    nodes
>    - FontLibrary simply adds to the selection of fonts available, and
>    retains emphasis of *family *and *style *fields within a given
>    FontStyle node.
>    - If separate font files redefine a given family (with the same name),
>    then addition of *enabled *field might allow authors to determine
>    which of them is relevant.  However *enabled *field can be considered
>    redundant (since changing url has same effect).
>    - Alternative approach to use of an *enabled *field, we might also
>    need to add a sentence such as
>    - "If a font family is redefined by multiple FontLibrary nodes, then
>       the first defined family is used."
>       - (or we can remain silent and let browser implementations sort
>       that out)
>
> FontLibrary node cons (meaning bundle all url functionality in FontStyle):
>
>    - Closer coupling of *family *field and font files themselves, recent
>    email dialog indicates that sometimes the font file simply overrides the
>    family field...
>    - We do not want to change any defined functionality for *family* and *style
>    *fields, they still seem correct in X3D Architecture and no suitable
>    changes yet seen.
>    - No need for *enabled *field.
>
> Our current opinion is that FontLibrary provides a superior approach to
> continued growth of FontStyle node.  To facilitate comparison and review,
> current draft has proposed FontLibrary prose in yellow, and alternate
> (not accepted) FontStyle alternative in cyan.
>
>    - X3D 4.1 (draft) Architecture, clause 15 Text component, 15.4.1
>    FontLibrary
>    -
>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/text.html#FontLibrary
>    X3D Architecture 4.1 draft — ISO/IEC 19775-1:202x — 15 Text component
>    <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/text.html#FontLibrary>
>    15.2.2.4 Language. The language field specifies the context of the
>    language for the text string in the form of a language and a country in
>    which that language is used. Both the language and the country are
>    specified using the language tags defined in which may specify only a
>    country (using the three-character codes defined in ISO 3166) or both a
>    language (using the two-character codes ...
>    www.web3d.org
>
>
> Additional questions to ponder, further insights welcome:
>
>    - Our impression of the term 'webfont' is that it is simply a generic
>    term, not a standard or specification per se, and often employed to
>    reference WOFF.  Is that correct?
>
>    - Font files tend to be large.  Might there ever be a use case where
>    an author chooses to define a font as source text in the url field?  We
>    have some precedent for this in Script url and (sorta) PixelTexture.
>    Nevertheless font definitions are also convoluted and (perhaps notoriously)
>    difficult to parse.  Of note is that WOFF2 specifically is designed for
>    effective binary compression.  Our inclination so far is to not describe
>    (or encourage) definition of the font within an X3D model.  YMMV (though we
>    doubt it).  Much better authoring approach is to use any of many conversion
>    tools that might credibly update a legacy font into WOFF2.
>
> Thanks everyone for leaning forward on this, looking ahead to continuing
> discussion.
>
> Have fun with font library collections for X3D models!  🙂
>
>
> 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
> https://faculty.nps.edu/brutzman
>
>
>
> ------------------------------
> *From:* x3d-public <x3d-public-bounces at web3d.org> on behalf of Brutzman,
> Donald (Don) (CIV) via x3d-public <x3d-public at web3d.org>
> *Sent:* Wednesday, February 26, 2025 5:39 PM
> *To:* X3D <x3d-public at web3d.org>
> *Cc:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Subject:* Re: [x3d-public] draft X3D 4.1 prose for font files and
> libraries
>
> Dick and I worked on suggested prose for X3D 4.1 with details continuing
> in Mantis 1490 below.
>
> Review request:
>
>    - X3D 4.1 Architecture (draft), 15 Text component, 15.4.1 FontStyle
>    -
>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/text.html#FontStyle
>
> Improvements:
>
>    - Include all X3DURLObject fields,
>
>   SFTime   [in,out] autoRefresh          0.0    [0,∞)
>   SFTime   [in,out] autoRefreshTimeLimit 3600.0 [0,∞)
>   SFString [in,out] description          ""
>   SFBool   [in,out] load                 TRUE
>   MFString [in,out] url                  []     [URI]
>
>    - Decided to NOT overload functionality of *family * field by adding
>    file names (sorry Holger!  adjusting your implementation will likely be
>    simple in comparison)
>
>    - New prose:
>
> The *url* field is optional and can refer to a relative or online address
> for a font library that contains one or more font definitions. An empty
> *url* list indicates that the default set of fonts provided by the
> browser are used. If present, only the first active font library retrieved
> from the *url* list shall be used. Individual font library files can be
> used by multiple FontStyle nodes in a scene. Each font file only needs to
> be loaded once per session.
> X3D browsers shall support WOFF (MIME type application/x-font-woff) (see W3C
> WOFF File Format
> <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#W3C_WOFF>).
> Support for the OpenType file format (MIME type
> application/x-font-opentype) (see OpenType Specification
> <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/bibliography.html#OPENTYPE>)
> and TrueType file format (MIME type application/x-font-truetype) (see ISO/IEC
> 14496-22 Open Font Format
> <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#I14496_22>)
> is also recommended.
> Security, licensing, and copyright/usage permissions are handled via the
> exposure of a font file itself.
> Support for the *autoRefresh*, *autoRefreshTimeLimit*, and *load* fields is
> optional.
> More details on the *autoRefresh*, *autoRefreshTimeLimit*, *description*,
> *load*, and *url* fields are contained in 9.2.1 URLs, URNs and URIs
> <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/networking.html#URLs>
> .
> Looking it over, adding more functionality to FontStyle node seems to be
> unwise.  Dick has an excellent proposal:
> TODO alternative approach: move all new functionality into a separate
> *FontLibrary* node to avoid complicating FontStyle further. This also
> offers the ability to succinctly load multiple font libraries in a given
> scene. The expense of defining a new node for X3D is offset by clearer
> distinction between X3D 4.0 and 4.1, also simplifying model content
> significantly.
> Feedback is welcome.
> Leaving existing FontStyle implementations alone probably avoids many
> unintended side effects.  First law of engineering:  "If it ain't broke,
> don't fix it."
>
> Thanks for all review.  It feels like we are finally converging on a
> straightforward approach to valuable future capabilities.
>
> Have fun with X3D fonts!  😎
>
>
> 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
> https://faculty.nps.edu/brutzman
>
>
>
> ------------------------------
> *From:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Sent:* Monday, February 24, 2025 9:32 AM
> *To:* X3D <x3d-public at web3d.org>
> *Cc:* Holger Seelig <holger.seelig at yahoo.de>
> *Subject:* Re: [x3d-public] Open dyslexic and/or (unfortunately)
> comicsans fonts; draft X3D 4.1 prose for font files and libraries
>
> Wow, really super Holger!  🙂
>
> There was a conversation about this on x3d-public a few years back... We
> committed to adding it in X3D 4.1 and (if I recall correctly) also noted
> that adding a url field might enable usage of larger font files.
>
> I've attempted to capture this candidate specification change in a Mantis
> issue.  All review, feedback, and improvements are always welcome.
>
>    - Mantis 1490 FontStyle handling of font files and font libraries
>    - https://mantis.web3d.org/view.php?id=1490
>
> Description.
> A goal for X3D 4.1 is use of font files in FontStyle (see Mantis 0001464
> <https://mantis.web3d.org/view.php?id=1464>).
>
> Addition of individual-font files might be accomplished by listing the
> font file name in the FontStyle 'family' field.
>
> Referencing different fonts in a single combined font library file may
> require an additional field, for example 'url'. In general the use of a
> font library may be preferred, but repeatedly run-time retrieval of a font
> library is not desirable, since the file might be quite large and rarely
> changing. This might be noted in the specification prose, e.g.
>
> - "MFString [in,out] url [] [URI]"
> - "The family field may list a specific font file. A font listed in the
> family field may be provided by a corresponding font library."
> - "The url field may refer to a font library. Font libraries can be used
> by multiple FontStyle nodes in a scene and need only be loaded once per
> session."
>
> Support levels: add "Level 2, FontStyle, support for font files in family
> field and support for font libraries via url field ."
>
> Security, licensing, and copyright/usage issues are handled via the
> exposure of the font file itself. If retrievable (locally or online) then
> proper access is presumably handled separately.
>
> Additional information.
> - X3D 4.1 (draft) Architecture, 15 Text component, 15.4.1 FontStyle
> -
> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#FontStyle
>
> - X3D 4.1 (draft) Architecture, 15 Text component, 15.4.2 Text
> -
> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#Text
>
> - X3D 4.1 (draft) Architecture, 15 Text component, 15.5 Support levels
> -
> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#SupportlLevels
>
> Have fun with X3D Text!   :)
>
>
> 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
> https://faculty.nps.edu/brutzman
>
>
>
> ------------------------------
> *From:* x3d-public <x3d-public-bounces at web3d.org> on behalf of Holger
> Seelig via x3d-public <x3d-public at web3d.org>
> *Sent:* Monday, February 24, 2025 2:48 AM
> *To:* X3D <x3d-public at web3d.org>
> *Cc:* Holger Seelig <holger.seelig at yahoo.de>
> *Subject:* Re: [x3d-public] Open dyslexic and/or (unfortunately)
> comicsans fonts
>
> With X_ITE you can use a URL in the family field of a FontStyle node to
> specify a path to a custom font file. Provided you have one of these fonts,
> it should be very easy:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "
> https://www.web3d.org/specifications/x3d-4.0.dtd">
> <X3D profile='Interchange' version='4.0' xmlns:xsd='
> http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='
> https://www.web3d.org/specifications/x3d-4.0.xsd'>
>   <head>
>     <component name='Text' level='1'/>
>   </head>
>   <Scene>
>     <Transform DEF='Text'>
>       <Shape>
>         <Appearance>
>           <Material/>
>         </Appearance>
>         <Text
>             string='"3D Text"'>
>           <FontStyle
>               family='"path/to/your/font.otf", "SERIF"'/>
>         </Text>
>       </Shape>
>     </Transform>
>   </Scene>
> </X3D>
>
> Supported File Formats:
>
> https://create3000.github.io/x_ite/components/text/fontstyle/#supported-file-formats
>
> Best regards,
> Holger
>
> --
> Holger Seelig
> Leipzig, Germany
>
> holger.seelig at yahoo.de
> https://create3000.github.io/x_ite/
>
> Am 24.02.2025 um 11:09 schrieb John Carlson via x3d-public <
> x3d-public at web3d.org>:
>
> If someone knows how change the fonts of the standards to OpenDyslexic or
> ComicSans, that might be a great accessibility experiment.
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250301/db01b350/attachment-0001.html>


More information about the x3d-public mailing list