diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 1998-03-20 05:18:31 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 1998-03-20 05:18:31 +0000 |
commit | bd274f1c691f67a4c4efc859da02c6fd7a6cfe49 (patch) | |
tree | eafbb26f65a008dd86feb7fdd7d39eb003a2eed2 /sys/arch | |
parent | 6eca3ec0066eedba2dd2398a565f016660def011 (diff) |
small (aka 'fixed' from X) fonts for raster consoles < 800*600 in size
this changes the choice to be at run-time from compile time
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 9 | ||||
-rw-r--r-- | sys/arch/sparc/dev/rcons_font.h | 11 |
2 files changed, 9 insertions, 11 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index 33c07334d44..9ef896b3f7f 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.13 1997/11/11 13:04:22 niklas Exp $ */ +/* $OpenBSD: fb.c,v 1.14 1998/03/20 05:18:27 todd Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -402,8 +402,11 @@ fbrcons_init(fb) rc->rc_width = fb->fb_type.fb_width; rc->rc_height = fb->fb_type.fb_height; rc->rc_depth = fb->fb_type.fb_depth; - /* Setup the static font */ - rc->rc_font = &console_font; + /* Setup the static font, use a small font if display is < 800x600 */ + if(rc->rc_height * rc->rc_width < 800*600) + rc->rc_font = &console_font_fixed; + else + rc->rc_font = &console_font; rc->rc_maxcol = rc->rc_width / rc->rc_font->width; rc->rc_maxrow = rc->rc_height / rc->rc_font->height; diff --git a/sys/arch/sparc/dev/rcons_font.h b/sys/arch/sparc/dev/rcons_font.h index 292ce909ba0..9cbce92e45a 100644 --- a/sys/arch/sparc/dev/rcons_font.h +++ b/sys/arch/sparc/dev/rcons_font.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rcons_font.h,v 1.4 1997/08/08 08:25:25 downsj Exp $ */ +/* $OpenBSD: rcons_font.h,v 1.5 1998/03/20 05:18:30 todd Exp $ */ /* $NetBSD: rcons_font.h,v 1.3 1995/11/29 22:03:53 pk Exp $ */ /* @@ -7,8 +7,6 @@ * largr one (`gallant19'). */ -#ifdef RASTERCONS_SMALLFONT - static u_int32_t font_fixed_0_pixels[] = { 0,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0xf0000000,0,0,0 }; @@ -1138,7 +1136,7 @@ static struct raster font_fixed_255 = { 6, 13, 1, 1, font_fixed_255_pixels, 0 }; #define null64 null32, null32 #define null128 null64, null64 -struct raster_font console_font = { +struct raster_font console_font_fixed = { 6, 13, 10, RASFONT_FIXEDWIDTH|RASFONT_NOVERTICALMOVEMENT, { { &font_fixed_0, 0, -10, 6, 0 }, @@ -1381,10 +1379,8 @@ struct raster_font console_font = { #undef null64 #undef null128 -#else /* RASTERCONS_SMALLFONT */ - /* - * PROM compatible fount + * PROM compatible font */ static u_int32_t gallant19_0_pixels[] = { 0, 0, 0x7fe00000, 0x7fe00000, 0x7fe00000, 0x7fe00000, 0x7fe00000, 0x7fe00000, 0x7fe00000, 0x7fe00000, @@ -2791,4 +2787,3 @@ struct raster_font console_font = { #endif /*COLORFONT_CACHE*/ }; -#endif /* RASTERCONS_SMALLFONT */ |