diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-07-01 02:12:43 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-07-01 02:12:43 +0000 |
commit | 13ea39a34766fcbecd96ab94bcdf798b08e9bb60 (patch) | |
tree | 1e1463b03838a6f36868a4dafc7e652358a51857 /console-client/vga-dynafont.c | |
parent | 1f8d504f631531c199d7c6154a0dc442d80ea4a7 (diff) | |
parent | 7e15f3d69a83a34ac62cbbee944a0bfbfa92724e (diff) | |
download | hurd-13ea39a34766fcbecd96ab94bcdf798b08e9bb60.tar.gz hurd-13ea39a34766fcbecd96ab94bcdf798b08e9bb60.tar.bz2 hurd-13ea39a34766fcbecd96ab94bcdf798b08e9bb60.zip |
Merge branch 'master' into xkb
Conflicts:
config.make.in
configure.in
Diffstat (limited to 'console-client/vga-dynafont.c')
-rw-r--r-- | console-client/vga-dynafont.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/console-client/vga-dynafont.c b/console-client/vga-dynafont.c index 3e0ec3ff..834d0aca 100644 --- a/console-client/vga-dynafont.c +++ b/console-client/vga-dynafont.c @@ -529,6 +529,31 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic, bdf_font_t font_bold, df->vga_font_last_free_index_lgc = 0; } + /* Ensure that ASCII is always available 1-to-1, for kernel messages. */ + for (int c = ' '; c <= '~'; c++) + { + glyph = bdf_find_glyph (df->font, c, 0); + if (!glyph) + glyph = bdf_find_glyph (df->font, -1, c); + if (glyph) + { + struct mapped_character *chr = &df->charmap_data[c]; + df->vga_font_free_indices--; + chr->refs = 1; + + for (int i = 0; i < ((glyph->bbox.height > 32) + ? 32 : glyph->bbox.height); i++) + df->vga_font[c][i] + = glyph->bitmap[i * ((glyph->bbox.width + 7) / 8)]; + if (glyph->bbox.height < 32) + memset (((char *) df->vga_font[c]) + + glyph->bbox.height, 0, 32 - glyph->bbox.height); + + /* Update the hash table. */ + hurd_ihash_add (&df->charmap, c, chr); + } + } + /* Ensure that we always have the replacement character available. */ { @@ -846,7 +871,7 @@ dynafont_lookup_internal (dynafont_t df, bdf_font_t font, chr->refs = 1; chr->character = (wide_chr | attr); - /* Copy the glyph bitmap, taking into account double-width charcters. */ + /* Copy the glyph bitmap, taking into account double-width characters. */ { int height = (glyph->bbox.height > 32) ? 32 : glyph->bbox.height; int bwidth = (glyph->bbox.width + 7) / 8; |