093995328667118cf901ec6bb93e36c4464c93c4 braney Mon Dec 7 10:37:41 2020 -0800 move a routine into a different file so it has access to the global definitions of fonts diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 7e0117e..3eaf710 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -626,53 +626,30 @@ && winStart <= cb->chromEnd) { safef(startBand, buffSize, "%s", cb->name); } /* End is > rather than >= due to odditiy in the cytoband track where the starts and ends of two bands overlaps by one. */ if (winEnd > cb->chromStart && winEnd <= cb->chromEnd) { safef(endBand, buffSize, "%s", cb->name); } } } -static void maybeNewFonts(struct hvGfx *hvg) -/* Check to see if we want to use the alternate font engine (FreeType2). */ -{ -if (sameString(cfgOptionDefault("freeType", "off"), "on")) - { - if (sameString(tl.textFont, "Bitmap")) - return; - - char *fontDir = cfgOptionDefault("freeTypeDir", "/usr/share/fonts/default/Type1"); - char buffer[4096]; - - extern char *freeTypeFontNames[]; - extern char *freeTypeFontFiles[]; - int ii; - for(ii=0; ii < 33; 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 ); - } -} boolean makeChromIdeoImage(struct track **pTrackList, char *psOutput, struct tempName *ideoTn) /* Make an ideogram image of the chromosome and our position in it. If the * ideoTn parameter is not NULL, it is filled in if the ideogram is created. */ { struct track *ideoTrack = NULL; MgFont *font = tl.font; char *mapName = "ideoMap"; struct hvGfx *hvg; boolean doIdeo = TRUE; int ideoWidth = round(.8 *tl.picWidth); int ideoHeight = 0; int textWidth = 0; struct tempName pngTn;