From e8800e674058ea33a8d43e5976277a18b8102233 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 30 Sep 2002 17:13:14 +0000 Subject: 2002-09-30 Marcus Brinkmann * vga-support.c (vga_get_font_width): New function. * vga-support.h: Add prototype for vga_get_font_width. * vga-dynafont.c (create_system_font): Call vga_get_font_width to determine real font width. --- console-client/vga-support.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'console-client/vga-support.c') diff --git a/console-client/vga-support.c b/console-client/vga-support.c index 30ed6533..717663ce 100644 --- a/console-client/vga-support.c +++ b/console-client/vga-support.c @@ -322,6 +322,14 @@ vga_set_font_height (int height) } +/* Get the font height in pixel. Can be 8 or 9. */ +int +vga_get_font_width (void) +{ + outb (VGA_SEQ_CLOCK_MODE_ADDR, VGA_SEQ_ADDR_REG); + return (inb (VGA_SEQ_DATA_REG) & VGA_SEQ_CLOCK_MODE_8) ? 8 : 9; +} + /* Set the font height in pixel. WIDTH can be 8 or 9. */ void vga_set_font_width (int width) -- cgit v1.2.3