5d0ada09248607057deba841ace59fd4d1f766ec jnavarr5 Fri Jun 26 12:49:54 2026 -0700 Use e.g. for font examples and make configure page's Font menu wording consistent in the mirror manual, refs #37698 diff --git src/hg/htdocs/goldenPath/help/mirrorManual.html src/hg/htdocs/goldenPath/help/mirrorManual.html index 71ea09c4652..808905ad986 100755 --- src/hg/htdocs/goldenPath/help/mirrorManual.html +++ src/hg/htdocs/goldenPath/help/mirrorManual.html @@ -2186,31 +2186,31 @@ 57e1a49c39a546c2883375df12111816 n019064l.pfb 84e347c88eff2e77ed40b020b457bafe n021003l.pfb 8721c1175d907d7d484bdaa91d4533ad n021004l.pfb eef0367afaa10b929e528c40c980b941 n021023l.pfb 7af41ff3536fadcdc27eb9e5cc1c32d3 n021024l.pfb db95b702b81c12df1f91d15c8a6c3191 n022003l.pfb e97c9af68414fabe157af711b7691df7 n022004l.pfb f13fb8e581426a1ffa5fc12b10ad0f34 n022023l.pfb f3cd9244150f086434b62d5c5bb559b0 n022024l.pfb 30aef717b7c68a6b6b7760b764fbd01c z003034l.pfb</code></pre> <a name='adding-a-new-font-to-the-genome-browser-display'></a> <h2>Adding a new font to the Genome Browser display</h2> <p> -The fonts offered in the hgTracks "configure" page Font menu are defined in a +The fonts offered in the hgTracks configure page's Font menu are defined in a table in the source code: the <code>freeTypeFonts[]</code> array in <code>src/hg/hgTracks/config.c</code> (<a href='https://raw.githubusercontent.com/ucscGenomeBrowser/kent/refs/heads/master/src/hg/hgTracks/config.c' title=''>view on GitHub</a>). Adding a font is therefore a source code change, and you will need to rebuild the CGIs afterward (see the <a href='#building-the-kent-source-tree' title=''>Building the kent source tree</a> section below). </p> <p> Once you have a font file in hand, adding it takes just two steps: </p> <ol> <li><p> Put the font file where the rendering engine can find it. At run time the @@ -2218,50 +2218,50 @@ hg.conf, which defaults to <code>../htdocs/urw-fonts</code>. That path is relative to the CGI working directory, so it resolves to the shared <code>htdocs/urw-fonts</code> directory even when you run from a per-user sandbox; you do not need a copy under your own htdocs. Both Type1 (<code>.pfb</code>) and TrueType (<code>.ttf</code>) font files are supported. </p></li> <li><p> Add a row to the <code>freeTypeFonts[]</code> table in <code>src/hg/hgTracks/config.c</code>, giving the name to display and the font file name, for example: </p> <pre><code>{"Lexend", "Lexend-Regular.ttf"}, {"Lexend-Bold", "Lexend-Bold.ttf"},</code></pre> <p> -The name is what appears in the configure-page Font menu. The configure page +The name is what appears in the configure page's Font menu. The configure page splits the name on the first "-" into a face and a style: the part before the "-" is the face shown in the Font menu, and the part after is an entry in the Style menu. A plain weight is just the face name (Lexend); a variant is written as Face-Style (Lexend-Bold). Group a face's variants on consecutive rows so the Style menu lists them together. </p></li> </ol> <p> A couple of things to watch out for: </p> <ul> <li><p> -Avoid variable fonts (for example InterVariable.ttf). The engine opens face +Avoid variable fonts (e.g. InterVariable.ttf). The engine opens face index 0 with no named instance selected, so a variable font renders only its default master, which is usually not the weight you expected. The symptom is that the new option appears in the menu but a different font is drawn. Use a -static, single-weight file instead (for example Inter-Regular.ttf). +static, single-weight file instead (e.g. Inter-Regular.ttf). </p></li> <li><p> The menu name must match the table exactly, including the face/style split described above. If a selected name matches no row in the table, the browser silently falls back to the old bitmap font engine. </p></li> </ul> <a name='building-the-kent-source-tree'></a> <h2>Building the kent source tree.</h2> <p> In some cases, you may have to modify the source code itself. In these cases, you would need to build all the tools and CGI programs from the source code on your machine. </p>