|
|
@@ -3,14 +3,14 @@
|
|
|
<head>
|
|
|
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
|
|
|
|
|
- <meta property="article:modified_time" content="2026-02-16T16:34:21+00:00" /><meta property="og:title" content="Importing Fonts" />
|
|
|
+ <meta property="article:modified_time" content="2026-02-16T21:19:30+00:00" /><meta property="og:title" content="Importing Fonts" />
|
|
|
<meta property="og:type" content="website" />
|
|
|
<meta property="og:url" content="https://docs.crownengine.org/html/latest/importing_resources/importing_fonts.html" />
|
|
|
<meta property="og:site_name" content="Crown 0.60.0 Manual" />
|
|
|
-<meta property="og:description" content="The font import dialog.," />
|
|
|
+<meta property="og:description" content="Crown can import fonts from popular font file formats. Importing a font produces a.font resource (a map of glyphs), an accompanying.texture resource (an atlas containing all the glyphs) and a.material resource suitable for drawing text. The Import Font dialog., Dialog overview..." />
|
|
|
<meta property="og:image" content="https://docs.crownengine.org/html/latest/_images/import_font.png" />
|
|
|
<meta property="og:image:alt" content="Crown 0.60.0 Manual" />
|
|
|
-<meta name="description" content="The font import dialog.," />
|
|
|
+<meta name="description" content="Crown can import fonts from popular font file formats. Importing a font produces a.font resource (a map of glyphs), an accompanying.texture resource (an atlas containing all the glyphs) and a.material resource suitable for drawing text. The Import Font dialog., Dialog overview..." />
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
<title>Importing Fonts — Crown 0.60.0 Manual 0.61.0 documentation</title>
|
|
|
@@ -66,7 +66,13 @@
|
|
|
<li class="toctree-l2"><a class="reference internal" href="importing_sprites.html">Importing Sprites</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="importing_textures.html">Importing Textures</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="importing_sounds.html">Importing Sounds</a></li>
|
|
|
-<li class="toctree-l2 current"><a class="current reference internal" href="#">Importing Fonts</a></li>
|
|
|
+<li class="toctree-l2 current"><a class="current reference internal" href="#">Importing Fonts</a><ul>
|
|
|
+<li class="toctree-l3"><a class="reference internal" href="#dialog-overview">Dialog overview</a></li>
|
|
|
+<li class="toctree-l3"><a class="reference internal" href="#renaming-the-font">Renaming the font</a></li>
|
|
|
+<li class="toctree-l3"><a class="reference internal" href="#atlas-generation">Atlas generation</a></li>
|
|
|
+<li class="toctree-l3"><a class="reference internal" href="#custom-charset">Custom charset</a></li>
|
|
|
+</ul>
|
|
|
+</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../gameplay/index.html">Writing Gameplay</a></li>
|
|
|
@@ -105,12 +111,44 @@
|
|
|
|
|
|
<section id="importing-fonts">
|
|
|
<h1>Importing Fonts<a class="headerlink" href="#importing-fonts" title="Permalink to this headline">¶</a></h1>
|
|
|
+<p>Crown can import fonts from popular font file formats. Importing a font produces
|
|
|
+a <code class="docutils literal notranslate"><span class="pre">.font</span></code> resource (a map of glyphs), an accompanying <code class="docutils literal notranslate"><span class="pre">.texture</span></code> resource
|
|
|
+(an atlas containing all the glyphs) and a <code class="docutils literal notranslate"><span class="pre">.material</span></code> resource suitable for
|
|
|
+drawing text.</p>
|
|
|
<figure class="align-center" id="id1">
|
|
|
<img alt="../_images/import_font.png" src="../_images/import_font.png" />
|
|
|
<figcaption>
|
|
|
-<p><span class="caption-text">The font import dialog.</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p>
|
|
|
+<p><span class="caption-text">The Import Font dialog.</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p>
|
|
|
</figcaption>
|
|
|
</figure>
|
|
|
+<section id="dialog-overview">
|
|
|
+<h2>Dialog overview<a class="headerlink" href="#dialog-overview" title="Permalink to this headline">¶</a></h2>
|
|
|
+<p>On the left, the importer shows a preview of the final texture atlas. On the
|
|
|
+right you can set various parameters that control which characters are included
|
|
|
+in the atlas and their size. This size does not have to match the size used when
|
|
|
+drawing text, but it is good practice to keep them similar to avoid scaling
|
|
|
+artifacts.</p>
|
|
|
+</section>
|
|
|
+<section id="renaming-the-font">
|
|
|
+<h2>Renaming the font<a class="headerlink" href="#renaming-the-font" title="Permalink to this headline">¶</a></h2>
|
|
|
+<p>Font files are often named with variants and other details embedded in the
|
|
|
+filename. If you prefer a simpler name, you can rename the font before
|
|
|
+importing by entering it in the <code class="docutils literal notranslate"><span class="pre">Name</span></code> field.</p>
|
|
|
+</section>
|
|
|
+<section id="atlas-generation">
|
|
|
+<h2>Atlas generation<a class="headerlink" href="#atlas-generation" title="Permalink to this headline">¶</a></h2>
|
|
|
+<p>The atlas dimensions are shown in <code class="docutils literal notranslate"><span class="pre">Atlas</span> <span class="pre">size</span></code>. They are determined
|
|
|
+automatically from the font <code class="docutils literal notranslate"><span class="pre">Size</span></code> and the selected <code class="docutils literal notranslate"><span class="pre">Charset</span></code>. Enter the
|
|
|
+desired font size and press <code class="docutils literal notranslate"><span class="pre">Enter</span></code>; Crown will regenerate the atlas and
|
|
|
+update the preview. Glyphs are packed as tightly as possible to keep the
|
|
|
+atlas small and avoid runtime performance issues.</p>
|
|
|
+</section>
|
|
|
+<section id="custom-charset">
|
|
|
+<h2>Custom charset<a class="headerlink" href="#custom-charset" title="Permalink to this headline">¶</a></h2>
|
|
|
+<p>By default Crown provides several common character sets in the <code class="docutils literal notranslate"><span class="pre">Charset</span></code>
|
|
|
+dropdown. For a custom range, use <code class="docutils literal notranslate"><span class="pre">Range</span> <span class="pre">min</span></code> and <code class="docutils literal notranslate"><span class="pre">Range</span> <span class="pre">max</span></code> to set the
|
|
|
+first and last Unicode code point to include in the font.</p>
|
|
|
+</section>
|
|
|
</section>
|
|
|
|
|
|
|