e9cd3eef710ba3141d58ef119006b7d2327e5b7f markd Wed Dec 9 13:52:01 2020 -0800 fixed accidently backout of master changes in the last merge diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 1eea6ae..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; @@ -8017,30 +7994,31 @@ * image. If the ideoTn parameter is not NULL, it is filled in if the * ideogram is created. */ { struct group *group; struct track *track; char *freezeName = NULL; boolean hideAll = cgiVarExists("hgt.hideAll"); boolean defaultTracks = cgiVarExists("hgt.reset"); boolean showedRuler = FALSE; boolean showTrackControls = cartUsualBoolean(cart, "trackControlsOnMain", TRUE); long thisTime = 0, lastTime = 0; basesPerPixel = ((float)virtWinBaseCount) / ((float)fullInsideWidth); zoomedToBaseLevel = (virtWinBaseCount <= fullInsideWidth / tl.mWidth); zoomedToCodonLevel = (ceil(virtWinBaseCount/3) * tl.mWidth) <= fullInsideWidth; +zoomedToCodonNumberLevel = (ceil(virtWinBaseCount/3) * tl.mWidth * 5) <= fullInsideWidth; zoomedToCdsColorLevel = (virtWinBaseCount <= fullInsideWidth*3); if (psOutput != NULL) { hPrintDisable(); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatches = NULL; } /* Tell browser where to go when they click on image. */ hPrintf("<FORM ACTION=\"%s\" NAME=\"TrackHeaderForm\" id=\"TrackHeaderForm\" METHOD=\"GET\">\n\n", hgTracksName()); jsonObjectAdd(jsonForClient, "insideX", newJsonNumber(insideX)); // TODO GALT fullInsideX? or does not matter? jsonObjectAdd(jsonForClient, "revCmplDisp", newJsonBoolean(revCmplDisp));