(value)
| 1741 | } |
| 1742 | |
| 1743 | function sanitizeU8g2FontName(value) { |
| 1744 | const v = String(value || "").trim(); |
| 1745 | // Keep it strict so we don't generate invalid C++ identifiers. |
| 1746 | if (U8G2_FONT_VALUES.has(v)) return v; |
| 1747 | if (/^u8g2_font_[A-Za-z0-9_]+$/.test(v)) return v; // allow custom fonts user knows exist |
| 1748 | return DEFAULT_U8G2_FONT; |
| 1749 | } |
| 1750 | |
| 1751 | function getElementFontForMode(el, mode) { |
| 1752 | if (!el) return mode === "u8g2" ? DEFAULT_U8G2_FONT : DEFAULT_TFT_FONT; |
no outgoing calls
no test coverage detected