summaryrefslogtreecommitdiff
path: root/console-client/vga-dynafont.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-02-13 02:27:49 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-02-13 02:27:49 +0100
commitbfa5d8f54612811d306d1453b7d2da549bbc60ee (patch)
tree2d2aa2b167d5ce5031d5978f44fddaa722fb07cc /console-client/vga-dynafont.h
parentc8b5250cc50a3451ecce9685d8b3457b3c1b133d (diff)
Add --font-width option to force 8/9 pixel font width
This permits to choose between 720x400 or 640x400 textmode without changing the font. * console-client/vga-hw.h (VGA_ATTR_MODE_ADDR, VGA_ATTR_MODE_LGE, VGA_ATTR_ENABLE_ADDR): New macros. * console-client/vga-support.c (vga_state): Add `attr_mode' field. (vga_init): Save attribute mode subregister content. Re-enable the screen after that. (vga_fini): Restore attribute mode subregister content. Re-enable the screen after that. (vga_set_font_width): When the font width is set to 9, enable VGA LGE to properly handle box-drawing unicode characters. Re-nable the screen after that. (vga_exchange_palette_attributes): Use VGA_ATTR_ENABLE_ADDR macro instead of harcoded 0x20. * console-client/vga-dynafont.h (dynafont_new): Add `width' parameter. * console-client/vga-dynafont.c (dynafont): Add `width' field. (dynafont_new): Add `width' parameter, stored in `width' field of `df', but using the font bbox as default value. Use it to decide whether to use VGA LGE or not. (dynafont_activate): Use `width' field of `df' instead of the font bbox to configure the VGA glyph width. * console-client/vga.c (vga_display_font_width): New variable. (vga_display): New `df_width' field. (argp_option): New `font-width' option. (parse_opt): Handle `font-width' option. (vga_display_init): Copy `vga_display_font_width' to `disp'. (vga_display_start): Pass `df_width' to `dynafont_new'.
Diffstat (limited to 'console-client/vga-dynafont.h')
-rw-r--r--console-client/vga-dynafont.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/console-client/vga-dynafont.h b/console-client/vga-dynafont.h
index c2bab700..0e80e047 100644
--- a/console-client/vga-dynafont.h
+++ b/console-client/vga-dynafont.h
@@ -45,7 +45,7 @@ typedef struct dynafont *dynafont_t;
the font is changed with dynafont_change_font. */
error_t dynafont_new (bdf_font_t font, bdf_font_t font_italic,
bdf_font_t font_bold, bdf_font_t font_bold_italic,
- int size, dynafont_t *dynafont);
+ int size, int width, dynafont_t *dynafont);
/* Release a dynafont object and its associated resources. */
void dynafont_free (dynafont_t df);