diff options
-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 */ |