<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div><br></div><div>x3dom supports all fonts which can be used on a web page. Currently that requires use of css on the html page to actually load a font from a url source. But browser font api improvements now should make it possible to simplify use of font files in x3dom directly from FontStyle.url or a similar node.</div><div><br></div><div>Some comments:</div><div><a href="https://www.w3.org/TR/WOFF2/">https://www.w3.org/TR/WOFF2/</a> is a compressed version of WOFF which seems popular on the web due to smaller file sizes. For example, it is used by the Google free Font service. I do not know if there are js/pascal/c etc. loading libraries for woff2 but it should at least be recommended.</div><div><br></div><div>From what I can tell WOFF and WOFF2 do not need to include font family name information inside the file. So I think that means if such a file is provided it will take precedence over the family field. Holger's overloading suggestion implicitly did this.</div><div><br></div><div>A web browser will synthesize bold and italic versions from a normal font version. Should this become a requirement for x3d as well ? Probably not. If authors want to use a bold version for certain, they need to provide corresponding font files.</div><div><br></div><div>It seems that a FontLibrary node would augment FontStyle rather than replace it. Would it have functionality other than providing a source for the font data ? It might be useful to associate a font family name with a font data file in such a node. The family name could then be referred to in the FontStyle.family field. DEF/USE might be a better mechanism, however.</div><div><br></div><div>In html, css can provide multiple sources for the same font-face, with the @font-face rule (and sophisticated hints helping to avoid loading when not needed among others.). For example, the likely local name for the font family on the client system can be provided in case it is already locally installed and therefore does not need to be downloaded.</div><div><br></div><div>Font management, layout and rendering seems very complex. It is a bit of a minefield for X3D to get into if high reproducibility is a goal.</div><div><br></div><div>Andreas</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Thu, 27 Feb 2025 01:39:41 +0000<br>
From: "Brutzman, Donald (Don) (CIV)" <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
To: X3D <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Subject: Re: [x3d-public] draft X3D 4.1 prose for font files and<br>
libraries<br>
Message-ID:<br>
<<a href="mailto:BY3PR13MB48847F72AF30D77F4D71ED95C4CD2@BY3PR13MB4884.namprd13.prod.outlook.com" target="_blank">BY3PR13MB48847F72AF30D77F4D71ED95C4CD2@BY3PR13MB4884.namprd13.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dick and I worked on suggested prose for X3D 4.1 with details continuing in Mantis 1490 below.<br>
<br>
Review request:<br>
<br>
*<br>
X3D 4.1 Architecture (draft), 15 Text component, 15.4.1 FontStyle<br>
*<br>
<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/text.html#FontStyle" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/text.html#FontStyle</a><br>
<br>
Improvements:<br>
<br>
*<br>
Include all X3DURLObject fields,<br>
<br>
SFTime [in,out] autoRefresh 0.0 [0,?)<br>
SFTime [in,out] autoRefreshTimeLimit 3600.0 [0,?)<br>
SFString [in,out] description ""<br>
SFBool [in,out] load TRUE<br>
MFString [in,out] url [] [URI]<br>
<br>
*<br>
Decided to NOT overload functionality of family field by adding file names (sorry Holger! adjusting your implementation will likely be simple in comparison)<br>
<br>
*<br>
New prose:<br>
<br>
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.<br>
X3D browsers shall support WOFF (MIME type application/x-font-woff) (see W3C WOFF File Format<<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#W3C_WOFF" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#W3C_WOFF</a>>). Support for the OpenType file format (MIME type application/x-font-opentype) (see OpenType Specification<<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/bibliography.html#OPENTYPE" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/bibliography.html#OPENTYPE</a>>) and TrueType file format (MIME type application/x-font-truetype) (see ISO/IEC 14496-22 Open Font Format<<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#I14496_22" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/references.html#I14496_22</a>>) is also recommended.<br>
Security, licensing, and copyright/usage permissions are handled via the exposure of a font file itself.<br>
Support for the autoRefresh, autoRefreshTimeLimit, and load fields is optional.<br>
More details on the autoRefresh, autoRefreshTimeLimit, description, load, and url fields are contained in 9.2.1 URLs, URNs and URIs<<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/networking.html#URLs" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/networking.html#URLs</a>>.<br>
Looking it over, adding more functionality to FontStyle node seems to be unwise. Dick has an excellent proposal:<br>
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.<br>
Feedback is welcome.<br>
Leaving existing FontStyle implementations alone probably avoids many unintended side effects. First law of engineering: "If it ain't broke, don't fix it."<br>
<br>
Thanks for all review. It feels like we are finally converging on a straightforward approach to valuable future capabilities.<br>
<br>
Have fun with X3D fonts! ?<br>
<br>
<br>
all the best, Don<br>
<br>
--<br>
<br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
<br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
<br>
X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">https://faculty.nps.edu/brutzman</a><br>
<br>
<br>
<br>
________________________________<br>
From: Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
Sent: Monday, February 24, 2025 9:32 AM<br>
To: X3D <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Cc: Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a>><br>
Subject: Re: [x3d-public] Open dyslexic and/or (unfortunately) comicsans fonts; draft X3D 4.1 prose for font files and libraries<br>
<br>
Wow, really super Holger! ?<br>
<br>
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.<br>
<br>
I've attempted to capture this candidate specification change in a Mantis issue. All review, feedback, and improvements are always welcome.<br>
<br>
*<br>
Mantis 1490 FontStyle handling of font files and font libraries<br>
*<br>
<a href="https://mantis.web3d.org/view.php?id=1490" rel="noreferrer" target="_blank">https://mantis.web3d.org/view.php?id=1490</a><br>
<br>
Description.<br>
A goal for X3D 4.1 is use of font files in FontStyle (see Mantis 0001464<<a href="https://mantis.web3d.org/view.php?id=1464" rel="noreferrer" target="_blank">https://mantis.web3d.org/view.php?id=1464</a>>).<br>
<br>
Addition of individual-font files might be accomplished by listing the font file name in the FontStyle 'family' field.<br>
<br>
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.<br>
<br>
- "MFString [in,out] url [] [URI]"<br>
- "The family field may list a specific font file. A font listed in the family field may be provided by a corresponding font library."<br>
- "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."<br>
<br>
Support levels: add "Level 2, FontStyle, support for font files in family field and support for font libraries via url field ."<br>
<br>
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.<br>
<br>
Additional information.<br>
- X3D 4.1 (draft) Architecture, 15 Text component, 15.4.1 FontStyle<br>
- <a href="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#FontStyle" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#FontStyle</a><br>
<br>
- X3D 4.1 (draft) Architecture, 15 Text component, 15.4.2 Text<br>
- <a href="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#Text" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#Text</a><br>
<br>
- X3D 4.1 (draft) Architecture, 15 Text component, 15.5 Support levels<br>
- <a href="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#SupportlLevels" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/text.html#SupportlLevels</a><br>
<br>
Have fun with X3D Text! :)<br>
<br>
<br>
all the best, Don<br>
<br>
--<br>
<br>
Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
<br>
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
<br>
X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">https://faculty.nps.edu/brutzman</a><br>
<br>
<br>
<br>
________________________________<br>
From: x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> on behalf of Holger Seelig via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Sent: Monday, February 24, 2025 2:48 AM<br>
To: X3D <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
Cc: Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a>><br>
Subject: Re: [x3d-public] Open dyslexic and/or (unfortunately) comicsans fonts<br>
<br>
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:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "<a href="https://www.web3d.org/specifications/x3d-4.0.dtd" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/x3d-4.0.dtd</a>"><br>
<X3D profile='Interchange' version='4.0' xmlns:xsd='<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>' xsd:noNamespaceSchemaLocation='<a href="https://www.web3d.org/specifications/x3d-4.0.xsd" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/x3d-4.0.xsd</a>'><br>
<head><br>
<component name='Text' level='1'/><br>
</head><br>
<Scene><br>
<Transform DEF='Text'><br>
<Shape><br>
<Appearance><br>
<Material/><br>
</Appearance><br>
<Text<br>
string='"3D Text"'><br>
<FontStyle<br>
family='"path/to/your/font.otf", "SERIF"'/><br>
</Text><br>
</Shape><br>
</Transform><br>
</Scene><br>
</X3D><br>
<br>
Supported File Formats:<br>
<a href="https://create3000.github.io/x_ite/components/text/fontstyle/#supported-file-formats" rel="noreferrer" target="_blank">https://create3000.github.io/x_ite/components/text/fontstyle/#supported-file-formats</a><br>
<br>
Best regards,<br>
Holger<br>
<br>
--<br>
Holger Seelig<br>
Leipzig, Germany<br>
<br>
<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a><br>
<a href="https://create3000.github.io/x_ite/" rel="noreferrer" target="_blank">https://create3000.github.io/x_ite/</a><br>
<br>
Am 24.02.2025 um 11:09 schrieb John Carlson via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>:<br>
<br>
If someone knows how change the fonts of the standards to OpenDyslexic or ComicSans, that might be a great accessibility experiment. _______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250227/60f4e72d/attachment.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250227/60f4e72d/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of x3d-public Digest, Vol 191, Issue 123<br>
********************************************<br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>