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

Function setElementFontForMode

app.js:1761–1772  ·  view source on GitHub ↗
(el, mode, value)

Source from the content-addressed store, hash-verified

1759}
1760
1761function setElementFontForMode(el, mode, value) {
1762 if (!el) return;
1763 if (mode === "u8g2") {
1764 const v = sanitizeU8g2FontName(value);
1765 el.u8g2Font = v;
1766 el.font = v; // backwards compat
1767 return;
1768 }
1769 const v = sanitizeTftFontId(value);
1770 el.tftFont = v;
1771 el.font = v; // backwards compat
1772}
1773
1774function ensureElementFontFields(el) {
1775 if (!el) return;

Callers 1

app.jsFile · 0.85

Calls 2

sanitizeU8g2FontNameFunction · 0.85
sanitizeTftFontIdFunction · 0.85

Tested by

no test coverage detected