50214f805964207ffae51a783513167cb51f5e2e braney Tue Sep 29 17:49:32 2020 -0700 support font choice in freetype font support diff --git src/hg/lib/trackLayout.c src/hg/lib/trackLayout.c index 4b774b6..0e5e03d 100644 --- src/hg/lib/trackLayout.c +++ src/hg/lib/trackLayout.c @@ -51,26 +51,27 @@ enabled = sameString(val, "yes"); first = FALSE; } return enabled; } void trackLayoutInit(struct trackLayout *tl, struct cart *cart) /* Initialize layout around small font and a picture about 600 pixels * wide, but this can be overridden by cart. */ { char *fontType = "medium"; boolean fontExtras = trackLayoutInclFontExtras(); if (fontExtras) fontType = cartUsualString(cart, "fontType", fontType); +tl->textFont = cartUsualString(cart, textFontVar, "nimbus mono medium r"); tl->textSize = mgFontSizeBackwardsCompatible(cartUsualString(cart, textSizeVar, "small")); MgFont *font = mgFontForSizeAndStyle(tl->textSize, fontType); tl->font = font; tl->mWidth = mgFontStringWidth(font, "M"); tl->nWidth = mgFontStringWidth(font, "n"); tl->fontHeight = mgFontLineHeight(font); tl->barbHeight = tl->fontHeight/4; tl->barbSpacing = (tl->fontHeight+1)/2; tl->picWidth = hgDefaultPixWidth; trackLayoutSetPicWidth(tl, cartOptionalString(cart, "pix")); }