| 1591 | } |
| 1592 | |
| 1593 | int GfxRenderer::getKerning(const int fontId, const uint32_t leftCp, const uint32_t rightCp, |
| 1594 | const EpdFontFamily::Style style) const { |
| 1595 | const auto fontIt = fontMap.find(fontId); |
| 1596 | if (fontIt == fontMap.end()) return 0; |
| 1597 | const int kernFP = fontIt->second.getKerning(leftCp, rightCp, style); // 4.4 fixed-point |
| 1598 | return fp4::toPixel(kernFP); // snap 4.4 fixed-point to nearest pixel |
| 1599 | } |
| 1600 | |
| 1601 | int GfxRenderer::getTextAdvanceX(const int fontId, const char* text, EpdFontFamily::Style style) const { |
| 1602 | // Advance table fast-path for SD card fonts during layout. |
no test coverage detected