MCPcopy Index your code
hub / github.com/ajatkj/scriptable / getRelativeFont

Function getRelativeFont

LSWeather.js:604–612  ·  view source on GitHub ↗
(fontName, relativeSize, bold)

Source from the content-addressed store, hash-verified

602FUNCTION getRelativeFont
603------------------------------------------------------------------*/
604function getRelativeFont(fontName, relativeSize, bold){
605 newFont = fontName.split(".")[0];
606 isBold = false;
607 if (bold || fontName.split(".")[1] == "bold") isBold = true;
608 if (relativeSize == HEADER_RSIZE) newFont = eval(`allfonts.${fontName}.up`);
609 else if (relativeSize == FOOTER_RSIZE) newFont = eval(`allfonts.${fontName}.down`);
610 if (!isBold) return eval(`allfonts.${newFont}.font`);
611 else return eval(`allfonts.${newFont}.boldFont`);
612}
613/*------------------------------------------------------------------
614FUNCTION placeDataElement
615------------------------------------------------------------------*/

Callers 1

createOverlayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected