浏览代码

FontEditor: Set all pixels when pasting a glyph

For an empty glyph (all pixels initially clear), this makes no
difference. However, if the glyph for the selected code point already
contains some set pixels, pasting used to "add" the set pixels, instead
of overwriting.
Ben Wiederhake 3 年之前
父节点
当前提交
63078ba7fc
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Userland/Applications/FontEditor/GlyphEditorWidget.cpp

+ 1 - 2
Userland/Applications/FontEditor/GlyphEditorWidget.cpp

@@ -107,8 +107,7 @@ void GlyphEditorWidget::paste_glyph()
     auto bitmap = font().raw_glyph(m_glyph).glyph_bitmap();
     for (int x = 0; x < min(bitmap.width(), buffer_width.value()); x++) {
         for (int y = 0; y < min(bitmap.height(), buffer_height.value()); y++) {
-            if (bits[x][y])
-                bitmap.set_bit_at(x, y, bits[x][y]);
+            bitmap.set_bit_at(x, y, bits[x][y]);
         }
     }