fix: handle fallbacks for advance table and prewarm (#1929)

## Summary
- Fixes #1928 by having the prewarm and advance table functions resolve
fallback styles
---

### AI Usage
Did you use AI tools to help write this code?  YES - Codex

---------

Co-authored-by: Uri Tauber <uritaube@gmail.com>
This commit is contained in:
Chun Ming Lee
2026-05-12 22:11:37 +03:00
committed by GitHub
co-authored by Uri Tauber
parent 30a209de8b
commit db3bb850b2
3 changed files with 43 additions and 17 deletions
+7
View File
@@ -71,6 +71,13 @@ class SdCardFont {
// Returns true if the given style is present in this font file.
bool hasStyle(uint8_t style) const;
// Resolve requested style bits to the closest present style.
uint8_t resolveStyle(uint8_t style) const;
// Resolve every requested style bit through fallback and return the actual
// styles that need cache/advance preparation.
uint8_t resolveStyleMask(uint8_t styleMask) const;
// Number of styles present in this font file.
uint8_t styleCount() const { return styleCount_; }