| <!-- |
| Documentation/_templates/layout.html |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. The |
| ASF licenses this file to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance with the |
| License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| License for the specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <!DOCTYPE html> |
| <html class="writer-html5" lang="en" > |
| <head> |
| <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" /> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title>nxfont — NuttX latest documentation</title> |
| <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../_static/copybutton.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../_static/tabs.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../_static/custom.css" type="text/css" /> |
| <link rel="shortcut icon" href="../../../_static/favicon.ico"/> |
| <!--[if lt IE 9]> |
| <script src="../../../_static/js/html5shiv.min.js"></script> |
| <![endif]--> |
| |
| <script src="../../../_static/jquery.js"></script> |
| <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script> |
| <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script> |
| <script src="../../../_static/doctools.js"></script> |
| <script src="../../../_static/sphinx_highlight.js"></script> |
| <script src="../../../_static/clipboard.min.js"></script> |
| <script src="../../../_static/copybutton.js"></script> |
| <script src="../../../_static/js/theme.js"></script> |
| <link rel="index" title="Index" href="../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../search.html" /> |
| <link rel="next" title="Network Support" href="../../net/index.html" /> |
| <link rel="prev" title="libnx" href="index.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| <div class="wy-grid-for-nav"> |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| <a href="../../../index.html" class="icon icon-home"> NuttX |
| |
| |
| |
| </a> |
| |
| <!-- this version selector is quite ugly, should be probably replaced by something |
| more modern --> |
| |
| <div class="version-selector"> |
| <select onchange="javascript:location.href = this.value;"> |
| |
| <option value="../../../../latest" selected="selected">latest</option> |
| |
| <option value="../../../../10.0.0" >10.0.0</option> |
| |
| <option value="../../../../10.0.1" >10.0.1</option> |
| |
| <option value="../../../../10.1.0" >10.1.0</option> |
| |
| <option value="../../../../10.2.0" >10.2.0</option> |
| |
| <option value="../../../../10.3.0" >10.3.0</option> |
| |
| <option value="../../../../11.0.0" >11.0.0</option> |
| |
| <option value="../../../../12.0.0" >12.0.0</option> |
| |
| <option value="../../../../12.1.0" >12.1.0</option> |
| |
| <option value="../../../../12.2.0" >12.2.0</option> |
| |
| <option value="../../../../12.2.1" >12.2.1</option> |
| |
| <option value="../../../../12.3.0" >12.3.0</option> |
| |
| <option value="../../../../12.4.0" >12.4.0</option> |
| |
| <option value="../../../../12.5.0" >12.5.0</option> |
| |
| <option value="../../../../12.5.1" >12.5.1</option> |
| |
| </select> |
| </div> |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> |
| <p class="caption" role="heading"><span class="caption-text">Table of Contents</span></p> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../../index.html">Home</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../introduction/index.html">Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../quickstart/index.html">Getting Started</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../contributing/index.html">Contributing</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../introduction/inviolables.html">The Inviolable Principles of NuttX</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../platforms/index.html">Supported Platforms</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../index.html">OS Components</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="../../binfmt.html">Binary Loader</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../drivers/index.html">Device Drivers</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../nxflat.html">NXFLAT</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../nxgraphics/index.html">NX Graphics Subsystem</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../paging.html">On-Demand Paging</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../audio/index.html">Audio Subsystem</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../filesystem/index.html">NuttX File System</a></li> |
| <li class="toctree-l2 current"><a class="reference internal" href="../index.html">NuttX libraries</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="../libc/index.html">libc</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../libdsp.html">libdsp</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../libm.html">libm</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../libxx.html">libxx</a></li> |
| <li class="toctree-l3 current"><a class="reference internal" href="index.html">libnx</a><ul class="current"> |
| <li class="toctree-l4 current"><a class="current reference internal" href="#">nxfont</a><ul> |
| <li class="toctree-l5"><a class="reference internal" href="#installing-new-fonts">Installing New Fonts</a></li> |
| <li class="toctree-l5"><a class="reference internal" href="#configuration-settings">Configuration Settings</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../../net/index.html">Network Support</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../mm/index.html">Memory Management</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../syscall.html">Syscall Layer</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../tools/index.html"><code class="docutils literal notranslate"><span class="pre">/tools</span></code> Host Tools</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../arch/index.html">Architecture-Specific Code</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../boards.html">Boards Support</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../cmake.html">CMake Support</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../openamp.html">OpenAMP Support</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../video.html">Video Subsystem</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../crypto.html">Crypto API Subsystem</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../wireless.html">Wireless Subsystem</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../applications/index.html">Applications</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../implementation/index.html">Implementation Details</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../reference/index.html">API Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../faq/index.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../guides/index.html">Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../glossary.html">Glossary</a></li> |
| </ul> |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../index.html">NuttX</a> |
| </nav> |
| |
| <div class="wy-nav-content"> |
| <div class="rst-content"> |
| <div role="navigation" aria-label="Page navigation"> |
| <ul class="wy-breadcrumbs"> |
| <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> |
| <li class="breadcrumb-item"><a href="../../index.html">OS Components</a></li> |
| <li class="breadcrumb-item"><a href="../index.html">NuttX libraries</a></li> |
| <li class="breadcrumb-item"><a href="index.html">libnx</a></li> |
| <li class="breadcrumb-item active">nxfont</li> |
| <li class="wy-breadcrumbs-aside"> |
| <a href="../../../_sources/components/libs/libnx/nxfonts.rst.txt" rel="nofollow"> View page source</a> |
| </li> |
| </ul> |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <section id="nxfont"> |
| <h1>nxfont<a class="headerlink" href="#nxfont" title="Permalink to this heading"></a></h1> |
| <p>This directory contains font support for NuttX. The contents of this directory |
| are only build if CONFIG_NXFONTS is defined in the NuttX configuration file.</p> |
| <section id="installing-new-fonts"> |
| <h2>Installing New Fonts<a class="headerlink" href="#installing-new-fonts" title="Permalink to this heading"></a></h2> |
| <p>There is a tool called bdf-converter in the directory tools/. The bdf-converter |
| program be used to convert fonts in Bitmap Distribution Format (BDF) |
| into fonts that can be used in the NX graphics system.</p> |
| <p>Below are general instructions for creating and installing a new font |
| in the NX graphic system:</p> |
| <ol class="arabic simple"> |
| <li><p>Locate a font in BDF format,</p></li> |
| <li><p>Use the bdf-converter program to convert the BDF font to the NuttX |
| font format. This will result in a C header file containing |
| definitions. That header file should be installed at, for example, |
| <code class="docutils literal notranslate"><span class="pre">graphics/nxfonts/nxfonts_myfont.h</span></code>.</p></li> |
| </ol> |
| <p>Create a new NuttX configuration variable. For example, suppose |
| you define the following variable: CONFIG_NXFONT_MYFONT. Then |
| you would need to:</p> |
| <ol class="arabic simple"> |
| <li><p>Define <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_MYFONT=y</span></code> in your NuttX configuration file.</p></li> |
| </ol> |
| <p>A font ID number has to be assigned for each new font. The font ID |
| is defined in the file <code class="docutils literal notranslate"><span class="pre">include/nuttx/nx/nxfonts.h</span></code>. Those definitions |
| have to be extended to support your new font. Look at how the font ID |
| enabled by <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS23X27</span></code> is defined and add an ID for your |
| new font in a similar fashion:</p> |
| <ol class="arabic" start="3"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">include/nuttx/nx/nxfonts.h</span></code> Add you new font as a possible system |
| default font:</p> |
| <blockquote> |
| <div><div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="cp">#if defined(CONFIG_NXFONT_SANS23X27)</span> |
| <span class="cp"># define NXFONT_DEFAULT FONTID_SANS23X27</span> |
| <span class="cp">#elif defined(CONFIG_NXFONT_MYFONT)</span> |
| <span class="cp"># define NXFONT_DEFAULT FONTID_MYFONT</span> |
| <span class="cp">#endif</span> |
| |
| <span class="n">Then</span><span class="w"> </span><span class="n">define</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">actual</span><span class="w"> </span><span class="n">font</span><span class="w"> </span><span class="n">ID</span><span class="p">.</span><span class="w"> </span><span class="n">Make</span><span class="w"> </span><span class="n">sure</span><span class="w"> </span><span class="n">that</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">font</span><span class="w"> </span><span class="n">ID</span><span class="w"> </span><span class="n">value</span> |
| <span class="n">is</span><span class="w"> </span><span class="n">unique</span><span class="o">:</span> |
| |
| <span class="k">enum</span><span class="w"> </span><span class="n">nx_fontid_e</span> |
| <span class="p">{</span> |
| <span class="w"> </span><span class="n">FONTID_DEFAULT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="cm">/* The default font */</span> |
| <span class="cp">#ifdef CONFIG_NXFONT_SANS23X27</span> |
| <span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">FONTID_SANS23X27</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="cm">/* The 23x27 sans serif font */</span> |
| <span class="cp">#endif</span> |
| <span class="cp">#ifdef CONFIG_NXFONT_MYFONT</span> |
| <span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="n">FONTID_MYFONT</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="cm">/* My shiny, new font */</span> |
| <span class="cp">#endif</span> |
| <span class="p">...</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| </li> |
| </ol> |
| <p>New Add the font to the NX build system. There are several files that |
| you have to modify to do this. Look how the build system uses the |
| font CONFIG_NXFONT_SANS23X27 for examaples:</p> |
| <ol class="arabic"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">nuttx/graphics/Makefile</span></code> This file needs logic to auto-generate |
| a C source file from the header file that you generated with the |
| the bdf-converter program. Notice NXFONTS_FONTID=2; this must be |
| set to the same font ID value that you defined in the |
| <code class="docutils literal notranslate"><span class="pre">include/nuttx/nx/nxfonts.h</span></code> file.</p> |
| <blockquote> |
| <div><div class="highlight-make notranslate"><div class="highlight"><pre><span></span><span class="nf">genfontsources</span><span class="o">:</span> |
| <span class="cp"> ifeq ($(CONFIG_NXFONT_SANS23X27),y)</span> |
| <span class="w"> </span>@<span class="k">$(</span>MAKE<span class="k">)</span><span class="w"> </span>-C<span class="w"> </span>nxfonts<span class="w"> </span>-f<span class="w"> </span>Makefile.sources<span class="w"> </span><span class="nv">NXFONTS_FONTID</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">EXTRAFLAGS</span><span class="o">=</span><span class="k">$(</span>EXTRAFLAGS<span class="k">)</span> |
| <span class="cp"> endif</span> |
| <span class="cp"> ifeq ($(CONFIG_NXFONT_MYFONT),y)</span> |
| <span class="w"> </span>@<span class="k">$(</span>MAKE<span class="k">)</span><span class="w"> </span>-C<span class="w"> </span>nxfonts<span class="w"> </span>-f<span class="w"> </span>Makefile.sources<span class="w"> </span><span class="nv">NXFONTS_FONTID</span><span class="o">=</span><span class="m">2</span><span class="w"> </span><span class="nv">EXTRAFLAGS</span><span class="o">=</span><span class="k">$(</span>EXTRAFLAGS<span class="k">)</span> |
| <span class="cp"> endif</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">nuttx/graphics/nxfonts/Make.defs</span></code>. Set the make variable NXFSET_CSRCS. |
| NXFSET_CSRCS determines the name of the font C file to build when |
| NXFONTS_FONTID=2:</p> |
| <blockquote> |
| <div><div class="highlight-make notranslate"><div class="highlight"><pre><span></span><span class="cp">ifeq ($(CONFIG_NXFONT_SANS23X27),y)</span> |
| <span class="nv">NXFSET_CSRCS</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span>nxfonts_bitmaps_sans23x27.c |
| <span class="cp">endif</span> |
| <span class="cp">ifeq ($(CONFIG_NXFONT_MYFONT),y)</span> |
| <span class="nv">NXFSET_CSRCS</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span>nxfonts_bitmaps_myfont.c |
| <span class="cp">endif</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">nuttx/graphics/nxfonts/Makefile.sources</span></code>. This is the Makefile used |
| in step 5 that will actually generate the font C file. So, given |
| your NXFONTS_FONTID=2, it needs to determine a prefix to use for |
| auto-generated variable and function names and (again) the name of |
| the autogenerated file to create (this must be the same name that |
| was used in nuttx/graphics/nxfonts/Make.defs):</p> |
| <blockquote> |
| <div><div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="n">ifeq</span><span class="w"> </span><span class="p">(</span><span class="n">$</span><span class="p">(</span><span class="n">NXFONTS_FONTID</span><span class="p">),</span><span class="mi">1</span><span class="p">)</span> |
| <span class="nl">NXFONTS_PREFIX</span><span class="w"> </span><span class="p">:</span><span class="o">=</span><span class="w"> </span><span class="n">g_sans23x27_</span> |
| <span class="n">GEN_CSRC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nxfonts_bitmaps_sans23x27</span><span class="p">.</span><span class="n">c</span> |
| <span class="n">endif</span> |
| <span class="n">ifeq</span><span class="w"> </span><span class="p">(</span><span class="n">$</span><span class="p">(</span><span class="n">NXFONTS_FONTID</span><span class="p">),</span><span class="mi">2</span><span class="p">)</span> |
| <span class="nl">NXFONTS_PREFIX</span><span class="w"> </span><span class="p">:</span><span class="o">=</span><span class="w"> </span><span class="n">g_myfont_</span> |
| <span class="n">GEN_CSRC</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nxfonts_bitmaps_myfont</span><span class="p">.</span><span class="n">c</span> |
| <span class="n">endif</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">graphics/nxfonts/nxfonts_bitmaps.c</span></code>. This is the file that contains |
| the generic font structures. It is used as a “template” file by |
| <code class="docutils literal notranslate"><span class="pre">nuttx/graphics/nxfonts/Makefile.sources</span></code> to create your customized |
| font data set.</p> |
| <blockquote> |
| <div><div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="cp">#if NXFONTS_FONTID == 1</span> |
| <span class="cp">#</span><span class="w"> </span><span class="cp">include</span><span class="w"> </span><span class="cpf">"nxfonts_sans23x27.h"</span> |
| <span class="cp">#elif NXFONTS_FONTID == 2</span> |
| <span class="cp">#</span><span class="w"> </span><span class="cp">include</span><span class="w"> </span><span class="cpf">"nxfonts_myfont.h"</span> |
| <span class="cp">#else</span> |
| <span class="cp"># error "No font ID specified"</span> |
| <span class="cp">#endif</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| <p>Where nxfonts_myfont.h is the NuttX font file that we generated in |
| step 2 using the bdf-converter tool.</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">graphics/nxfonts/nxfonts_getfont.c</span></code>. Finally, we need to extend the |
| logic that does the run-time font lookups so that can find our new |
| font. The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid). |
| The new font information needs to be added to data structures used by |
| that function</p> |
| <blockquote> |
| <div><div class="highlight-C notranslate"><div class="highlight"><pre><span></span><span class="cp">#ifdef CONFIG_NXFONT_SANS23X27</span> |
| <span class="k">extern</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">nx_fontpackage_s</span><span class="w"> </span><span class="n">g_sans23x27_package</span><span class="p">;</span> |
| <span class="cp">#endif</span> |
| <span class="cp">#ifdef CONFIG_NXFONT_MYFONT</span> |
| <span class="k">extern</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">nx_fontpackage_s</span><span class="w"> </span><span class="n">g_myfont_package</span><span class="p">;</span> |
| <span class="cp">#endif</span> |
| |
| <span class="k">static</span><span class="w"> </span><span class="n">FAR</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">nx_fontpackage_s</span><span class="w"> </span><span class="o">*</span><span class="n">g_fontpackages</span><span class="p">[]</span><span class="w"> </span><span class="o">=</span> |
| <span class="p">{</span> |
| <span class="cp">#ifdef CONFIG_NXFONT_SANS23X27</span> |
| <span class="o">&</span><span class="n">g_sans23x27_package</span><span class="p">,</span> |
| <span class="cp">#endif</span> |
| <span class="cp">#ifdef CONFIG_NXFONT_MYFONT</span> |
| <span class="o">&</span><span class="n">g_myfont_package</span><span class="p">,</span> |
| <span class="cp">#endif</span> |
| <span class="nb">NULL</span> |
| <span class="p">};</span> |
| </pre></div> |
| </div> |
| </div></blockquote> |
| </li> |
| </ol> |
| </section> |
| <section id="configuration-settings"> |
| <h2>Configuration Settings<a class="headerlink" href="#configuration-settings" title="Permalink to this heading"></a></h2> |
| <section id="nxfonts"> |
| <h3>NxFonts<a class="headerlink" href="#nxfonts" title="Permalink to this heading"></a></h3> |
| <ul> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS</span></code></p> |
| <p>Enables font support</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_CHARBITS</span></code></p> |
| <p>The number of bits in the character set. Current options are only 7 and 8. |
| The default is 7.</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_1BPP</span></code>, <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_2BPP</span></code>, |
| <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_4BPP</span></code>, <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_8BPP</span></code>, |
| <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_16BPP</span></code>, <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_24BPP</span></code>, and |
| <code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_DISABLE_32BPP</span></code></p> |
| <p>NX supports a variety of pixel depths. You can save some memory by disabling |
| support for unused color depths.</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONTS_PACKEDMSFIRST</span></code></p> |
| <p>If a pixel depth of less than 8-bits is used, then NX needs to know if the |
| pixels pack from the MS to LS or from LS to MS</p> |
| </li> |
| </ul> |
| </section> |
| <section id="font-selections"> |
| <h3>Font Selections<a class="headerlink" href="#font-selections" title="Permalink to this heading"></a></h3> |
| <ul> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS17X22</span></code></p> |
| <p>This option enables support for a tiny, 17x22 san serif font |
| (font ID FONTID_SANS17X22 == 14).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS20X26</span></code></p> |
| <p>This option enables support for a tiny, 20x26 san serif font |
| (font ID FONTID_SANS20X26 == 15).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS23X27</span></code></p> |
| <p>This option enables support for a tiny, 23x27 san serif font |
| (font ID FONTID_SANS23X27 == 1).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS22X29</span></code></p> |
| <p>This option enables support for a small, 22x29 san serif font |
| (font ID FONTID_SANS22X29 == 2).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS28X37</span></code></p> |
| <p>This option enables support for a medium, 28x37 san serif font |
| (font ID FONTID_SANS28X37 == 3).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS39X48</span></code></p> |
| <p>This option enables support for a large, 39x48 san serif font |
| (font ID FONTID_SANS39X48 == 4).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS17X23B</span></code></p> |
| <p>This option enables support for a tiny, 17x23 san serif bold font |
| (font ID FONTID_SANS17X23B == 16).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS20X27B</span></code></p> |
| <p>This option enables support for a tiny, 20x27 san serif bold font |
| (font ID FONTID_SANS20X27B == 17).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS22X29B</span></code></p> |
| <p>This option enables support for a small, 22x29 san serif bold font |
| (font ID FONTID_SANS22X29B == 5).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS28X37B</span></code></p> |
| <p>This option enables support for a medium, 28x37 san serif bold font |
| (font ID FONTID_SANS28X37B == 6).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SANS40X49B</span></code></p> |
| <p>This option enables support for a large, 40x49 san serif bold font |
| (font ID FONTID_SANS40X49B == 7).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF22X29</span></code></p> |
| <p>This option enables support for a small, 22x29 font (with serifs) |
| (font ID FONTID_SERIF22X29 == 8).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF29X37</span></code></p> |
| <p>This option enables support for a medium, 29x37 font (with serifs) |
| (font ID FONTID_SERIF29X37 == 9).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF38X48</span></code></p> |
| <p>This option enables support for a large, 38x48 font (with serifs) |
| (font ID FONTID_SERIF38X48 == 10).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF22X28B</span></code></p> |
| <p>This option enables support for a small, 27x38 bold font (with serifs) |
| (font ID FONTID_SERIF22X28B == 11).</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF27X38B</span></code></p> |
| <p>This option enables support for a medium, 27x38 bold font (with serifs) |
| (font ID FONTID_SERIF27X38B == 12). |
| p</p> |
| </li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">CONFIG_NXFONT_SERIF38X49B</span></code></p> |
| <p>This option enables support for a large, 38x49 bold font (with serifs) |
| (font ID FONTID_SERIF38X49B == 13).</p> |
| </li> |
| </ul> |
| <p>[REVISIT… this list is not complete]</p> |
| </section> |
| </section> |
| </section> |
| |
| |
| </div> |
| </div> |
| <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> |
| <a href="index.html" class="btn btn-neutral float-left" title="libnx" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> |
| <a href="../../net/index.html" class="btn btn-neutral float-right" title="Network Support" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> |
| </div> |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p>© Copyright 2023, The Apache Software Foundation.</p> |
| </div> |
| |
| |
| |
| </footer> |
| </div> |
| </div> |
| </section> |
| </div> |
| <script> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| </body> |
| </html> |