+2012-01-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix handling of wide characters in gfxterm.
+
+ * grub-core/term/gfxterm.c (grub_colored_char): Remove width and index.
+ (clear_char): Likewise.
+ (paint_char): Skip code == NULL chars.
+ (grub_gfxterm_putchar): Set code = NULL on "shadowed" positions.
+
2012-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/charset.c: Move comment to right place.
/* Color values. */
grub_video_color_t fg_color;
grub_video_color_t bg_color;
-
- /* The width of this character minus one. */
- unsigned char width;
-
- /* The column index of this character. */
- unsigned char index;
};
struct grub_virtual_screen
grub_errno = GRUB_ERR_NONE;
c->fg_color = virtual_screen.fg_color;
c->bg_color = virtual_screen.bg_color;
- c->width = 0;
- c->index = 0;
}
static void
p = (virtual_screen.text_buffer
+ cx + (cy * virtual_screen.columns));
- p -= p->index;
+ if (!p->code)
+ return;
/* Get glyph for character. */
glyph = grub_font_construct_glyph (virtual_screen.font, p->code);
grub_errno = GRUB_ERR_NONE;
p->fg_color = virtual_screen.fg_color;
p->bg_color = virtual_screen.bg_color;
- p->width = char_width - 1;
- p->index = 0;
/* If we have large glyph, add fixup info. */
if (char_width > 1)
* virtual_screen.rows; i++)
{
grub_free (p[i].code);
- p[i].code = grub_unicode_glyph_from_code (' ');
- if (!p[i].code)
- grub_errno = GRUB_ERR_NONE;
- p[i].width = char_width - 1;
- p[i].index = i;
+ p[i].code = NULL;
}
}