summaryrefslogtreecommitdiff
path: root/LibGUI/GTextBox.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-05 06:43:33 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-05 06:43:33 +0100
commita258d6507a9d4c7ec7bd951fd51d16e67fc2b561 (patch)
tree1792527c5a0e0d4e411e47d90e41551de31e76e9 /LibGUI/GTextBox.cpp
parent612c02307e9d721e8939da46e361aeb7dbdb3e0c (diff)
downloadserenity-a258d6507a9d4c7ec7bd951fd51d16e67fc2b561.zip
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.
Diffstat (limited to 'LibGUI/GTextBox.cpp')
-rw-r--r--LibGUI/GTextBox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/LibGUI/GTextBox.cpp b/LibGUI/GTextBox.cpp
index fb761fcdf1..fd8adbae4f 100644
--- a/LibGUI/GTextBox.cpp
+++ b/LibGUI/GTextBox.cpp
@@ -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) {