(el, mode, value)
| 1759 | } |
| 1760 | |
| 1761 | function 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 | |
| 1774 | function ensureElementFontFields(el) { |
| 1775 | if (!el) return; |
no test coverage detected