1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00

LibGfx+FontEditor: Account for raw width when painting glyphs

Fixes hidden glyphs being painted in editor and map, and '?'
subsitute glyphs being overdrawn in the system.
This commit is contained in:
thankyouverycool 2021-04-22 14:25:28 -04:00 committed by Andreas Kling
parent 0664fbd584
commit cc7744f6ca
3 changed files with 9 additions and 4 deletions

View file

@ -147,7 +147,7 @@ void GlyphEditorWidget::paint_event(GUI::PaintEvent& event)
for (int y = 0; y < font().glyph_height(); ++y) {
for (int x = 0; x < font().max_glyph_width(); ++x) {
Gfx::IntRect rect { x * m_scale, y * m_scale, m_scale, m_scale };
if (x >= font().glyph_width(m_glyph)) {
if (x >= font().raw_glyph_width(m_glyph)) {
painter.fill_rect(rect, palette().threed_shadow1());
} else {
if (bitmap.bit_at(x, y))