diff options
author | 2002-05-02 19:21:48 +0000 | |
---|---|---|
committer | 2002-05-02 19:21:48 +0000 | |
commit | 51a6661ecdf9fb0a17272a36bab0f924814eed1a (patch) | |
tree | e0f2912263faea19ca892f28fc890e4b089ac430 | |
parent | the exponent parameter is: (diff) | |
download | wireguard-openbsd-51a6661ecdf9fb0a17272a36bab0f924814eed1a.tar.xz wireguard-openbsd-51a6661ecdf9fb0a17272a36bab0f924814eed1a.zip |
use the gallant 12x22 font by default on screens that are more
than 960 pixels wide if !SMALL_KERNEL, like rcons does.
Ok drahn@, mickey@, miod@.x
-rw-r--r-- | sys/dev/pci/tga.c | 14 | ||||
-rw-r--r-- | sys/dev/rasops/rasops.c | 12 | ||||
-rw-r--r-- | sys/dev/wsfont/wsfont.c | 20 |
3 files changed, 32 insertions, 14 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index 56c192d315a..c1be6d36bdb 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.15 2002/04/26 20:04:50 matthieu Exp $ */ +/* $OpenBSD: tga.c,v 1.16 2002/05/02 19:21:48 matthieu Exp $ */ /* $NetBSD: tga.c,v 1.40 2002/03/13 15:05:18 ad Exp $ */ /* @@ -364,8 +364,13 @@ tga_getdevconfig(memt, pc, tag, dc) DPRINTF("tga_getdevconfig: wsfont_init\n"); wsfont_init(); - /* prefer 8 pixel wide font */ - if ((cookie = wsfont_find(NULL, 8, 0, 0)) <= 0) + if (rip->ri_width > 80*12) + /* High res screen, choose a big font */ + cookie = wsfont_find(NULL, 12, 0, 0); + else + /* lower res, choose a 8 pixel wide font */ + cookie = wsfont_find(NULL, 8, 0, 0); + if (cookie <= 0) cookie = wsfont_find(NULL, 0, 0, 0); if (cookie <= 0) { printf("tga: no appropriate fonts.\n"); @@ -381,8 +386,7 @@ tga_getdevconfig(memt, pc, tag, dc) dc->dc_rinfo.ri_wsfcookie = cookie; /* fill screen size */ rasops_init(rip, dc->dc_ht / rip->ri_font->fontheight, - dc->dc_wid / rip->ri_font->fontwidth); - /* rasops_init(rip, 34, 80); */ + dc->dc_wid / rip->ri_font->fontwidth); /* add our accelerated functions */ /* XXX shouldn't have to do this; rasops should leave non-NULL diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index bc15dfbcbaa..97e936412bf 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops.c,v 1.2 2002/03/14 01:27:02 millert Exp $ */ +/* $OpenBSD: rasops.c,v 1.3 2002/05/02 19:21:48 matthieu Exp $ */ /* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */ /*- @@ -129,8 +129,14 @@ rasops_init(ri, wantrows, wantcols) wsfont_init(); - /* Want 8 pixel wide, don't care about aestethics */ - if ((cookie = wsfont_find(NULL, 8, 0, 0)) <= 0) + if (ri->ri_width > 80*12) + /* High res screen, choose a big font */ + cookie = wsfont_find(NULL, 12, 0, 0); + else + /* lower res, choose a 8 pixel wide font */ + cookie = wsfont_find(NULL, 8, 0, 0); + + if (cookie <= 0) cookie = wsfont_find(NULL, 0, 0, 0); if (cookie <= 0) { diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c index 92a8ef53da7..b2d18293401 100644 --- a/sys/dev/wsfont/wsfont.c +++ b/sys/dev/wsfont/wsfont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfont.c,v 1.2 2002/03/14 01:27:03 millert Exp $ */ +/* $OpenBSD: wsfont.c,v 1.3 2002/05/02 19:21:48 matthieu Exp $ */ /* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */ /*- @@ -57,11 +57,6 @@ #include <dev/wsfont/qvss8x15.h> #endif -#ifdef FONT_GALLANT12x22 -#define HAVE_FONT 1 -#include <dev/wsfont/gallant12x22.h> -#endif - #ifdef FONT_LUCIDA16x29 #define HAVE_FONT 1 #include <dev/wsfont/lucida16x29.h> @@ -92,16 +87,29 @@ #include <dev/wsfont/omron12x20.h> #endif +#ifdef FONT_GALLANT12x22 +#define HAVE_FONT 1 +#endif + /* Make sure we always have at least one font. */ #ifndef HAVE_FONT #define HAVE_FONT 1 #define FONT_BOLD8x16 1 +/* Add the gallant 12x22 font for high screen resolutions */ +#if !defined(SMALL_KERNEL) && !defined(FONT_GALLANT12x22) +#define FONT_GALLANT12x22 +#endif #endif #ifdef FONT_BOLD8x16 #include <dev/wsfont/bold8x16.h> #endif +#ifdef FONT_GALLANT12x22 +#include <dev/wsfont/gallant12x22.h> +#endif + + /* Placeholder struct used for linked list */ struct font { struct font *next; |