| 62 | bool FontCacheManager::isScanning() const { return scanMode_ == ScanMode::Scanning; } |
| 63 | |
| 64 | void FontCacheManager::recordText(const char* text, int fontId, EpdFontFamily::Style style) { |
| 65 | scanText_ += text; |
| 66 | if (scanFontId_ < 0) scanFontId_ = fontId; |
| 67 | const uint8_t baseStyle = static_cast<uint8_t>(style) & 0x03; |
| 68 | const unsigned char* p = reinterpret_cast<const unsigned char*>(text); |
| 69 | uint32_t cpCount = 0; |
| 70 | while (*p) { |
| 71 | if ((*p & 0xC0) != 0x80) cpCount++; |
| 72 | p++; |
| 73 | } |
| 74 | scanStyleCounts_[baseStyle] += cpCount; |
| 75 | } |
| 76 | |
| 77 | // --- PrewarmScope implementation --- |
| 78 | |