[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[1950] 2009-01-19 Vesa J?\195?\164?\195?\164skel?\195?\164inen <address@
From: |
Vesa Jääskeläinen |
Subject: |
[1950] 2009-01-19 Vesa J?\195?\164?\195?\164skel?\195?\164inen <address@hidden .fi> |
Date: |
Mon, 19 Jan 2009 17:09:53 +0000 |
Revision: 1950
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1950
Author: chaac
Date: 2009-01-19 17:09:53 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
2009-01-19 Vesa J?\195?\164?\195?\164skel?\195?\164inen <address@hidden>
* font/font.c (grub_font_loader_init): Re-position unknown glyph.
* term/gfxterm.c (write_char): Fix background rendering for wide
width glyphs.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/font/font.c
trunk/grub2/term/gfxterm.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2009-01-19 12:33:07 UTC (rev 1949)
+++ trunk/grub2/ChangeLog 2009-01-19 17:09:53 UTC (rev 1950)
@@ -1,3 +1,10 @@
+2009-01-19 Vesa Jääskeläinen <address@hidden>
+
+ * font/font.c (grub_font_loader_init): Re-position unknown glyph.
+
+ * term/gfxterm.c (write_char): Fix background rendering for wide
+ width glyphs.
+
2009-01-19 Robert Millan <address@hidden>
* config.guess: Update to latest version from config git.
Modified: trunk/grub2/font/font.c
===================================================================
--- trunk/grub2/font/font.c 2009-01-19 12:33:07 UTC (rev 1949)
+++ trunk/grub2/font/font.c 2009-01-19 17:09:53 UTC (rev 1950)
@@ -145,7 +145,7 @@
unknown_glyph->width = 8;
unknown_glyph->height = 16;
unknown_glyph->offset_x = 0;
- unknown_glyph->offset_y = 0;
+ unknown_glyph->offset_y = -3;
unknown_glyph->device_width = 8;
grub_memcpy(unknown_glyph->bitmap,
unknown_glyph_bitmap, sizeof(unknown_glyph_bitmap));
@@ -153,8 +153,8 @@
/* Initialize the null font. */
font_init (&null_font);
null_font.name = "<No Font>";
- null_font.ascent = unknown_glyph->height;
- null_font.descent = 1;
+ null_font.ascent = unknown_glyph->height-3;
+ null_font.descent = 3;
null_font.max_char_width = unknown_glyph->width;
null_font.max_char_height = unknown_glyph->height;
Modified: trunk/grub2/term/gfxterm.c
===================================================================
--- trunk/grub2/term/gfxterm.c 2009-01-19 12:33:07 UTC (rev 1949)
+++ trunk/grub2/term/gfxterm.c 2009-01-19 17:09:53 UTC (rev 1950)
@@ -680,6 +680,8 @@
unsigned int x;
unsigned int y;
int ascent;
+ unsigned int height;
+ unsigned int width;
/* Find out active character. */
p = (virtual_screen.text_buffer
@@ -691,7 +693,10 @@
/* Get glyph for character. */
glyph = grub_font_get_glyph (virtual_screen.font, p->code);
ascent = grub_font_get_ascent (virtual_screen.font);
-
+
+ width = virtual_screen.normal_char_width * calculate_character_width(glyph);
+ height = virtual_screen.normal_char_height;
+
color = p->fg_color;
bgcolor = p->bg_color;
@@ -700,13 +705,13 @@
/* Render glyph to text layer. */
grub_video_set_active_render_target (text_layer);
- grub_video_fill_rect (bgcolor, x, y, glyph->width, glyph->height);
+ grub_video_fill_rect (bgcolor, x, y, width, height);
grub_font_draw_glyph (glyph, color, x, y + ascent);
grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
/* Mark character to be drawn. */
dirty_region_add (virtual_screen.offset_x + x, virtual_screen.offset_y + y,
- glyph->width, glyph->height);
+ width, height);
}
static void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [1950] 2009-01-19 Vesa J?\195?\164?\195?\164skel?\195?\164inen <address@hidden .fi>,
Vesa Jääskeläinen <=