MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / getElementFontForMode

Function getElementFontForMode

app.js:1751–1759  ·  view source on GitHub ↗
(el, mode)

Source from the content-addressed store, hash-verified

1749}
1750
1751function getElementFontForMode(el, mode) {
1752 if (!el) return mode === "u8g2" ? DEFAULT_U8G2_FONT : DEFAULT_TFT_FONT;
1753 if (mode === "u8g2") {
1754 const candidate = el.u8g2Font || el.font;
1755 return sanitizeU8g2FontName(candidate);
1756 }
1757 const candidate = el.tftFont || el.font;
1758 return sanitizeTftFontId(candidate);
1759}
1760
1761function setElementFontForMode(el, mode, value) {
1762 if (!el) return;

Callers 3

ensureElementFontFieldsFunction · 0.85
updatePropsInputsFunction · 0.85
generateTFTCodeFunction · 0.85

Calls 2

sanitizeU8g2FontNameFunction · 0.85
sanitizeTftFontIdFunction · 0.85

Tested by

no test coverage detected