<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
One critical point in the design here seems to be the nature of a "collection" as described in WOFF2.  It sounds like multiple fonts, but I might be misinterpreting it.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
If instead it is a collection of characters for a single given font family, then there is less impetus to share such library collections of fonts as a global node (rather than a FontStyle field).</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I have searched but not found a woff file with multiple font families... Not conclusive but an indicator at least.  So it is important to see just what a collection is.  It will be super if we can find more information in the WOFF Recommendation (and the other
 standards) on this possibility... Certainly there are use cases for font files that aggregate a collection of multiple font faces and styles.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Taking the "fork in the road" approach - both global FontLibrary nodes and FontStyle.fontLibrary nodes - lets us handle both cases, if needed.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
It looks like the CSS examples are further interesting not just for syntax but from a design perspective too.   If we were able to create four FontStyle nodes, each containing a fontLibrary field holding a different FontLibrary woff font, and similarly produce
 four plain-bold-italic-bolditalic FontStyle nodes for a given family, that would have similar expressive power to the CSS example.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
P.S. Please do not feel any sense of "rushing" here, this is unfinished business from X3D 4.0 that was intentionally deferred to X3D 4.1.  We can take all the time we want, sorting these questions out carefully with working examples.  It is good to see that
 compelling results are within reach, so coming up with the right approach is worth our time spent on design.</div>
<div id="Signature" class="elementToProof">
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;"><br>
</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">all the best, Don</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">--</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman@nps.edu</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;"> </span></p>
</div>
<div id="appendonsend"></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div dir="ltr" id="divRplyFwdMsg"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> Michalis Kamburelis <michalis.kambi@gmail.com><br>
<b>Sent:</b> Saturday, March 1, 2025 4:48 PM<br>
<b>To:</b> Extensible 3D (X3D) Graphics public discussion <x3d-public@web3d.org><br>
<b>Cc:</b> Brutzman, Donald (Don) (CIV) <brutzman@nps.edu><br>
<b>Subject:</b> Re: [x3d-public] draft X3D 4.1 prose for font files and libraries</span>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
</div>
<br>
<div style="direction: ltr;">Don,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">It seems there are some assumptions in your design that don't match what I experience when actually loading fonts :)</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- The "font file" like TTF / OTF / WOFF is really just one font, that is: it is a set of glyphs for *one* particular family and *one* style combination. </div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- And the name of that family, and the style, is not even specified inside this font file. It's only, only by loose conventions, usually somehow reflected in the font filename. E.g. we can guess that "DejaVuSerif-BoldItalic.ttf"
 contains font family "DejaVuSerif" and the style is "BOLDITALIC", but that's really only a loose convention, people name their fonts in whatever way they want.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">- The "font file" is not a collection of font definitions, it's not a collection of font styles, and it doesn't even say what is the "family name" inside. Your design of FontLibrary seems to assume otherwise.Your example shows FontLibrary
 with URLs using "MjQamj1kuP_soQ3o-rysO9Ci_8oJlIUUInI.woff2" and then FontStyle.family saying "Playwright_CA_Guides". But there's no connection between these 2 things.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">See the references I posted in my answers, e.g. about WOFF in CSS:
<a href="https://stackoverflow.com/questions/12812441/how-do-i-use-woff-fonts-for-my-website" id="OWA750124bb-d4e2-97a2-53ad-91dff1ffb694" class="OWAAutoLink" originalsrc="https://stackoverflow.com/questions/12812441/how-do-i-use-woff-fonts-for-my-website" data-auth="NotApplicable">
https://stackoverflow.com/questions/12812441/how-do-i-use-woff-fonts-for-my-website</a> :</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">"""</div>
<div style="direction: ltr;">@font-face {<br>
  font-family: "myfont";<br>
  src: url("fonts/awesome-font.woff") format('woff');<br>
}<br>
<br>
@font-face {<br>
  font-family: "myfont";<br>
  src: url("fonts/awesome-font-bold.woff") format('woff');<br>
  font-weight: bold;<br>
}<br>
<br>
@font-face {<br>
  font-family: "myfont";<br>
  src: url("fonts/awesome-font-boldoblique.woff") format('woff');<br>
  font-weight: bold;<br>
  font-style: italic;<br>
}<br>
<br>
@font-face {<br>
  font-family: "myfont";<br>
  src: url("fonts/awesome-font-oblique.woff") format('woff');<br>
  font-style: italic;<br>
}</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">...</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">.mydiv {<br>
  font-family: myfont;<br>
}</div>
<div style="direction: ltr;">"""</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">So you have 4 WOFF files. Each one defines a different style. The above CSS definition makes them all available under a family name "myfont" (which is just an invented family name, to connect the usage in .mydiv with 4 font files
 mentioned above).</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Maybe I don't know something, maybe there are other font "collections", but I didn't see them or use them. Reading WOFF spec (
<a href="https://www.w3.org/TR/WOFF2/" id="OWA0383f901-8b64-4839-2b72-d6fbece1967e" class="OWAAutoLink" originalsrc="https://www.w3.org/TR/WOFF2/" data-auth="NotApplicable">
https://www.w3.org/TR/WOFF2/</a> ) doesn't seem to contradict what I'm saying. And all my usage of TTF / OTF / WOFF files only confirms it. One file = one family with one style.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Regards,</div>
<div style="direction: ltr;">Michalis</div>
<br>
<div style="direction: ltr;">sob., 1 mar 2025 o 23:38 Brutzman, Donald (Don) (CIV) via x3d-public <<a href="mailto:x3d-public@web3d.org" id="OWAea22b715-f207-510e-0cae-0b13333dc3c6" class="OWAAutoLink">x3d-public@web3d.org</a>> napisał(a):</div>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left: 1px solid rgb(204, 204, 204);">
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
The current design-phase draft prose assumes that </div>
<ul style="direction: ltr; list-style-type: disc;">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">FontLibrary loads font files and has them available for use by FontStyle and ScreenFontStyle,</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">FontStyle does not load any files,</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">FontStyle definition of 'family' field will look through all of the available fonts to find the correctly matching family.</div>
</li></ul>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
If that is not possible, then it would seem we need another design (perhaps the cyan text) that can closely couple a single perhaps-no-name font file with a corresponding FontStyle.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
My understanding is that a font file can contain multiple fonts, and optionally multiple styles for each font.  If so, then some kind of disambiguation by name must be possible, correct?</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
From this perspective, does it seem that two types of font files are possible?</div>
<ul style="direction: ltr; list-style-type: disc;">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">Those containing a single perhaps-no-name font family, or</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">Those containing multiple named font families.</div>
</li></ul>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Perhaps we need to look at multiple font specifications in detail?  Here is the primary specification, WOFF2:</div>
<ul style="direction: ltr; list-style-type: disc;">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">W3C WOFF File Format 2.0, section 3. Overall file structure and basic data types</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">"<span style="background-color: rgb(255, 255, 0);">The structure of WOFF2 files is similar to that of SFNT and WOFF 1.0 font files, in that there is a header followed by a table directory, followed by the data for those tables.
 The SFNT structure is described fully in the TrueType [TrueType], OpenType [OpenType], and ISO "Open Font Format" [OFF] specifications.</span>"</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">"A complete WOFF2 file consists of several blocks of data: a 48-byte header, immediately followed (in this order) by a variable-size Table Directory, an optional Collection Directory (present only if the input font file is a font
 collection), a compressed font data block, an optional block of Extended Metadata, and an optional block of Private Data."</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">"WOFF2 File</div>
</li><ul style="direction: ltr; list-style-type: circle;">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;"><span style="background-color: rgb(255, 255, 0);">WOFF2Header
</span>      <span style="background-color: rgb(255, 255, 0);">File header with basic font type and version</span>, along with offsets to metadata and private data blocks.</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;">TableDirectory    Directory of font tables, containing size and other info. "</div>
</li></ul>
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="direction: ltr;"><a href="https://www.w3.org/TR/WOFF2/#FileStructure" id="OWAf8f6a32f-4011-13f6-28fb-c84ba05272bf" class="OWAAutoLink" originalsrc="https://www.w3.org/TR/WOFF2/#FileStructure" data-auth="NotApplicable">https://www.w3.org/TR/WOFF2/#FileStructure</a></div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div style="width:100%;margin-top:16px;margin-bottom:16px;max-width:800px;min-width:424px" id="x_m_1979294222970553338m_-4646480300321308330LPBorder_GTaHR0cHM6Ly93d3cudzMub3JnL1RSL1dPRkYyLyNGaWxlU3RydWN0dXJl">
<table id="x_m_1979294222970553338m_-4646480300321308330LPContainer613833" style="border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px; width: 100%;">
<tbody>
<tr>
<td style="width: 100%; height: 110.4px;">
<div style="font-size:21px;font-weight:300;margin-right:8px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px" id="x_m_1979294222970553338m_-4646480300321308330LPTitle613833">
<a href="https://www.w3.org/TR/WOFF2/#FileStructure" id="OWA88cc4436-b52b-608e-ceaf-cebf959838e5" class="OWAAutoLink" originalsrc="https://www.w3.org/TR/WOFF2/#FileStructure" data-auth="NotApplicable" style="text-decoration: none;">WOFF File Format 2.0 - World
 Wide Web Consortium (W3C)</a></div>
<div style="font-size:14px;max-height:100px;color:rgb(102,102,102);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px;margin-right:8px;overflow:hidden" id="x_m_1979294222970553338m_-4646480300321308330LPDescription613833">
3. Overall file structure and basic data types. The structure of WOFF2 files is similar to that of SFNT and WOFF 1.0 font files, in that there is a header followed by a table directory, followed by the data for those tables.</div>
<div style="font-size:14px;color:rgb(166,166,166);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif" id="x_m_1979294222970553338m_-4646480300321308330LPMetadata613833">
<a href="http://www.w3.org/" id="OWA5c9098b6-a12b-1ade-ca26-fa9e3f78fad0" class="OWAAutoLink" originalsrc="http://www.w3.org/" data-auth="NotApplicable">www.w3.org</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="direction: ltr;"><br>
</div>
</li></ul>
<div style="direction: ltr; font-family: "Courier New"; font-size: 9pt; color: rgb(0, 0, 0);">
all the best, Don</div>
<div id="x_m_1979294222970553338m_-4646480300321308330Signature">
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">--</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">Don Brutzman  Naval Postgraduate School, Code USW/Br       
<a href="mailto:brutzman@nps.edu" id="OWA206e6ace-5f61-723e-992f-437277f46ad3" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;">
brutzman@nps.edu</a></span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;">X3D graphics, virtual worlds, navy robotics
<a href="https://faculty.nps.edu/brutzman" id="OWA87550196-0845-219c-69b7-3f0b26740479" class="OWAAutoLink" data-auth="NotApplicable" style="margin-top: 0px; margin-bottom: 0px;">
https://faculty.nps.edu/brutzman</a></span></p>
<p style="margin: 0in; font-family: Calibri, sans-serif; font-size: 11pt;"><span style="font-family: "Courier New"; font-size: 9pt;"> </span></p>
</div>
<div id="x_m_1979294222970553338m_-4646480300321308330appendonsend"></div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="direction: ltr; display: inline-block; width: 98%;">
<div dir="ltr" id="x_m_1979294222970553338m_-4646480300321308330divRplyFwdMsg"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" id="OWA203bebda-fd16-a009-d061-c8323baca573" class="OWAAutoLink">x3d-public-bounces@web3d.org</a>>
 on behalf of Holger Seelig via x3d-public <<a href="mailto:x3d-public@web3d.org" id="OWA8a2e824f-9c20-3505-5ab1-dc083b03b7e2" class="OWAAutoLink">x3d-public@web3d.org</a>><br>
<b>Sent:</b> Saturday, March 1, 2025 2:12 PM<br>
<b>To:</b> X3D <<a href="mailto:x3d-public@web3d.org" id="OWAec96d780-1e7c-86c7-76c6-d015ef8756a3" class="OWAAutoLink">x3d-public@web3d.org</a>><br>
<b>Cc:</b> Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" id="OWA3766c978-9da7-885c-6e1d-57682cf9a012" class="OWAAutoLink">holger.seelig@yahoo.de</a>><br>
<b>Subject:</b> Re: [x3d-public] draft X3D 4.1 prose for font files and libraries</span>
<div> </div>
</div>
<div style="direction: ltr;">I would also like to point out once again that a font file (WOFF, OTF, TTF) does not automatically contain the name or family name of the font. A name can therefore only be extracted from the URL. Which is certainly not desirable. </div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">It is therefore not clear how to deduce a font file from the field `FontStyle.family`.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Best regards,</div>
<div style="direction: ltr;">Holger</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
--</div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
Holger Seelig</div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
Leipzig, Germany</div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
<br>
</div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
<a href="mailto:holger.seelig@yahoo.de" id="OWA7a9caf09-3281-89ef-afa4-2cbda4a40efa" class="OWAAutoLink">holger.seelig@yahoo.de</a></div>
<div style="direction: ltr; text-align: left; text-indent: 0px; color: rgb(0, 0, 0);">
<a href="https://create3000.github.io/x_ite/" id="OWA088fd46f-11a3-391f-cef7-2abee66b242a" class="OWAAutoLink" originalsrc="https://create3000.github.io/x_ite/" data-auth="NotApplicable">https://create3000.github.io/x_ite/</a></div>
<div style="direction: ltr;"><br>
</div>
<blockquote>
<div style="direction: ltr;">Am 27.02.2025 um 13:26 schrieb Andreas Plesch via x3d-public <<a href="mailto:x3d-public@web3d.org" id="OWA508a8aff-2981-1fbb-0264-50785b84cf4b" class="OWAAutoLink">x3d-public@web3d.org</a>>:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Since I wanted to do this for some time as it really makes webfonts much more usable with x3dom, I came up with a first implementation of the url field:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/dc9111dcd106f1a69d567ceca8f52701/raw/8cdf9764f11e08b5f541dee487fc0811bb0cf927/FontHaveFunWithX3D.x3d" id="OWA877d993c-bb01-74b5-b3f5-94295d2fadea" class="OWAAutoLink" originalsrc="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/dc9111dcd106f1a69d567ceca8f52701/raw/8cdf9764f11e08b5f541dee487fc0811bb0cf927/FontHaveFunWithX3D.x3d" data-auth="NotApplicable">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/dc9111dcd106f1a69d567ceca8f52701/raw/8cdf9764f11e08b5f541dee487fc0811bb0cf927/FontHaveFunWithX3D.x3d</a></div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">This is experimental and only for the viewer.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">All loading can be done now by x3dom. Both the style and family fields are essentially ignored if a url MFString is available. Multiple urls can be provided as fallbacks. The url field accepts input and can be changed dynamically.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Here are other examples which show how css in the html can be used for webfont loading.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><a href="https://andreasplesch.github.io/x3dom/test/functional/text_fonts.html" id="OWA68fd85b4-9d28-bed1-e4ce-a4d61f76978a" class="OWAAutoLink" originalsrc="https://andreasplesch.github.io/x3dom/test/functional/text_fonts.html" data-auth="NotApplicable">https://andreasplesch.github.io/x3dom/test/functional/text_fonts.html</a></div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">That can have advantages as this then provides all of the very many css options to x3d. For example, it is straightforward to copy and paste the css provided by google fonts. The link between css and x3d becomes the font-family
 name plus style plus weight. No changes to the spec. are needed.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">The simplest solution other than a url field I can think of is a new Font node which can only represent one font file with a single font and overrides family and style fields. That node can then be DEF/USEd between Text nodes. Perhaps
 there could be an additional FontLibray node which can hold multiple Font nodes but I am not sure if this is necessary.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">In theory, it would be possible to add style (normal, italic) and weight (quite a few classes, and numeric) fields to such a Font node. These would define what the font provides. Then the FontStyle fields could be used to either
 select the closest match for rendering, or do synthesis which can be useful as some fonts do not have bold or italic versions. But all this is really the responsibility of the author anyways, and not necessary. </div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Andreas</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">On Wed, Feb 26, 2025 at 10:51 PM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" id="OWA0e4c9d2e-c3d6-8d5d-c5e8-e77e4841278a" class="OWAAutoLink">michalis.kambi@gmail.com</a>> wrote:</div>
<blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left: 1px solid rgb(204, 204, 204);">
<div style="direction: ltr;">Andreas Plesch wrote:<br>
> <a href="https://www.w3.org/TR/WOFF2/" id="OWAcec18f2d-32c4-d261-9c72-11f347b2df6e" class="OWAAutoLink" originalsrc="https://www.w3.org/TR/WOFF2/" data-auth="NotApplicable">
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.<br>
<br>
CGE (Pascal) just uses FreeType for font reading, so we should support<br>
everything that FreeType handles :) And it does support WOFF 2<br>
according to <a href="https://www.phoronix.com/news/FreeType-2.10.2-Released" id="OWA3bd3cc32-e987-a203-a4f4-b6178672c865" class="OWAAutoLink" originalsrc="https://www.phoronix.com/news/FreeType-2.10.2-Released" data-auth="NotApplicable">
https://www.phoronix.com/news/FreeType-2.10.2-Released</a> .<br>
<br>
><br>
> 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.<br>
><br>
> 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.<br>
<br>
I see Andres comments align nicely with mine, posted 5 mins ago :)<br>
<br>
I also don't think X3D browsers should have the requirement to<br>
synthesize bold and italic versions from a normal font version. If<br>
FreeType doesn't do this (and I don't think it can) then it's not<br>
something I would ever implement, frankly. I'm not even sure how good<br>
are WWW browsers at doing this "synthesizing". The recommendation for<br>
using fonts, that I always seen followed, is that you need 4 font<br>
files (regular, bold, italic, bold+italic) if you want to provide all<br>
the options. The font authors seems to generally agree -- most fonts<br>
come with 4 such files.<br>
<br>
And as Andreas said, the spec should say that "url" overrides "family".<br>
<br>
Regards,<br>
Michalis</div>
</blockquote>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" id="OWAcfc9fff2-030c-e4a1-cdee-73334a585232" class="OWAAutoLink">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" id="OWA34ed87e1-1c94-a9f0-5530-8c7819e18f61" class="OWAAutoLink" data-auth="NotApplicable">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></div>
</blockquote>
<div style="direction: ltr;"><br>
</div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" id="OWA8d8da0f4-6e64-80a3-05e4-3ba5d92ee629" class="OWAAutoLink">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" id="OWA1300c239-908e-3c47-5374-ddb69431e8eb" class="OWAAutoLink" data-auth="NotApplicable">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote>
</body>
</html>