mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-13 10:26:37 +02:00
mmap all the font files!
Font now uses the same in-memory format as the font files we have on disk. This allows us to simply mmap() the font files and not use any additional memory for them. Very cool! :^) Hacking on this exposed a bug in file-backed VMObjects where the first client to instantiate a VMObject for a specific inode also got to decide its size. Since file-backed VMObjects always have the same size as the underlying file, this made no sense, so I removed the ability to even set a size in that case.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 15:52:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a258d6507a9
@@ -46,7 +46,7 @@ void GTextBox::paint_event(GPaintEvent&)
|
||||
if (ch == ' ')
|
||||
continue;
|
||||
int x = inner_rect.x() + (i * font().glyph_width());
|
||||
painter.draw_bitmap({x, y}, font().glyph_bitmap(ch), Color::Black);
|
||||
painter.draw_glyph({x, y}, ch, Color::Black);
|
||||
}
|
||||
|
||||
if (is_focused() && m_cursor_blink_state) {
|
||||
|
||||
Reference in New Issue
Block a user