e7b8cf99966c69186d97ad5259811d4172a6ff19
braney
  Mon May 24 15:54:42 2021 -0700
if people aren't compiling with USE_FREETYPE, the default for using
freeType fonts should be "off".

diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c
index 51dd445..80122e2 100644
--- src/hg/hgTracks/config.c
+++ src/hg/hgTracks/config.c
@@ -95,51 +95,62 @@
 "n021003l.pfb",
 "n021004l.pfb",
 "n021023l.pfb",
 "n021024l.pfb",
 "n022003l.pfb",
 "n022004l.pfb",
 "n022023l.pfb",
 "n022024l.pfb",
 "z003034l.pfb",
 };
 
 char *emptyStyles[] = {
 "Normal"
 };
 
+static boolean freeTypeOn()
+{
+#ifdef USE_FREETYPE
+char *defaultState = "on";
+#else // USE_FREETYPE
+char *defaultState = "off";
+#endif // USE_FREETYPE
+
+return sameString(cfgOptionDefault("freeType", defaultState), "on");
+}
+
 void maybeNewFonts(struct hvGfx *hvg)
 /* Check to see if we want to use the alternate font engine (FreeType2). */
 {
-if (sameString(cfgOptionDefault("freeType", "on"), "on"))
-    {
+if (!freeTypeOn())
+    return;
+
 if (sameString(tl.textFont, "Bitmap"))
     return;
 
 char *fontDir = cfgOptionDefault("freeTypeDir", "../htdocs/urw-fonts");
 char buffer[4096];
 
 int ii;
 for(ii=0; ii < ArraySize(freeTypeFontNames); ii++)
     if (sameString(freeTypeFontNames[ii], tl.textFont))
         break;
 char *fontFile = freeTypeFontFiles[ii];
 char *fontName = freeTypeFontNames[ii];
 safef(buffer, sizeof buffer, "%s/%s", fontDir, fontFile);
 hvGfxSetFontMethod(hvg, FONT_METHOD_FREETYPE, fontName, buffer );
 }
-}
 
 static void textFontDropDown()
 /* Create drop down for font size. */
 {
 /* get current values for font and style */
 char *currentFontName = cloneString(tl.textFont);
 char *currentStyle = strchr(currentFontName, '-');
 if (currentStyle)
     *currentStyle++ = 0;
 else
     currentStyle = "Normal";
 
 char *faceNames[sizeof(freeTypeFontNames)];
 int ii;
 int numFonts = 0;
@@ -591,31 +602,31 @@
 if (trackLayoutInclFontExtras())
     {
     hPrintf("<TD>");
     char *defaultStyle = cartUsualString(cart, "fontType", "medium");
     cartMakeRadioButton(cart, "fontType", "medium", defaultStyle);
     hPrintf("&nbsp;medium&nbsp;");
     cartMakeRadioButton(cart, "fontType", "fixed", defaultStyle);
     hPrintf("&nbsp;fixed&nbsp;");
     cartMakeRadioButton(cart, "fontType", "bold", defaultStyle);
     hPrintf("&nbsp;bold&nbsp;");
     hPrintf("&nbsp;");
     hPrintf("</TD>");
     }
 hPrintf("</TR>");
 
-if (sameString(cfgOptionDefault("freeType", "on"), "on"))
+if (freeTypeOn())
     {
     hPrintf("<TR><TD>font:");
     hPrintf("<TD style=\"text-align: right\">");
     textFontDropDown();
     hPrintf("</TD></TR>");
     hPrintf("<TR><TD id='textStyleName'>style:");
     hPrintf("<TD style=\"text-align: right\" id='textStyleDrop' >");
     textStyleDropDown();
     hPrintf("</TR>");
     hPrintf("</TR>");
     }
 
 themeDropDown(cart);
 
 hTableStart();