mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Font: Eagerly load all 256 glyphs. It's not that many.
This commit is contained in:
parent
2e370fa4d5
commit
c7b005c47b
Notes:
sideshowbarker
2024-07-19 15:56:14 +09:00
Author: https://github.com/awesomekling
Commit: c7b005c47b
4 changed files with 11 additions and 28 deletions
|
@ -47,12 +47,7 @@ void GTextBox::paint_event(GPaintEvent&)
|
|||
if (ch == ' ')
|
||||
continue;
|
||||
int x = innerRect.x() + (i * font().glyph_width());
|
||||
auto* bitmap = font().glyph_bitmap(ch);
|
||||
if (!bitmap) {
|
||||
dbgprintf("GTextBox: glyph missing: %02x\n", ch);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
painter.draw_bitmap({x, y}, *bitmap, Color::Black);
|
||||
painter.draw_bitmap({x, y}, font().glyph_bitmap(ch), Color::Black);
|
||||
}
|
||||
|
||||
if (is_focused() && m_cursorBlinkState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue