Add VT220 8x8 font with ISO-8859-1 chars which is converted from

sys/arch/atari/dev/font_8x8.c.
This commit is contained in:
tsutsui 2010-07-22 12:48:00 +00:00
parent a03437fae7
commit 476a3c873b
3 changed files with 2643 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.wsfont,v 1.15 2007/02/02 02:10:24 ober Exp $
# $NetBSD: files.wsfont,v 1.16 2010/07/22 12:48:00 tsutsui Exp $
defpseudo wsfont
@ -14,6 +14,7 @@ defflag opt_wsfont.h FONT_BOLD8x16
FONT_VT220L8x8
FONT_VT220L8x10
FONT_VT220L8x16
FONT_VT220ISO8x8
FONT_VT220ISO8x16
FONT_VT220KOI8x10_KOI8_R
FONT_VT220KOI8x10_KOI8_U

2623
sys/dev/wsfont/vt220iso8x8.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsfont.c,v 1.47 2010/05/04 04:53:59 macallan Exp $ */
/* $NetBSD: wsfont.c,v 1.48 2010/07/22 12:48:00 tsutsui Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.47 2010/05/04 04:53:59 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.48 2010/07/22 12:48:00 tsutsui Exp $");
#include "opt_wsfont.h"
@ -78,6 +78,11 @@ __KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.47 2010/05/04 04:53:59 macallan Exp $")
#include <dev/wsfont/vt220l8x16.h>
#endif
#ifdef FONT_VT220ISO8x8
#define HAVE_FONT 1
#include <dev/wsfont/vt220iso8x8.h>
#endif
#ifdef FONT_VT220ISO8x16
#define HAVE_FONT 1
#include <dev/wsfont/vt220iso8x16.h>
@ -169,6 +174,9 @@ static struct font builtin_fonts[] = {
#ifdef FONT_VT220L8x16
{ { NULL, NULL }, &vt220l8x16, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
#endif
#ifdef FONT_VT220ISO8x8
{ { NULL, NULL }, &vt220iso8x8, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
#endif
#ifdef FONT_VT220ISO8x16
{ { NULL, NULL }, &vt220iso8x16, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
#endif
@ -371,9 +379,9 @@ wsfont_rotate_cw_internal(struct wsdisplay_font *font)
struct wsdisplay_font *
wsfont_rotate_ccw_internal(struct wsdisplay_font *font)
{
int b, n, r, newstride;
int b, n, r, namelen, newstride;
struct wsdisplay_font *newfont;
char *newbits;
char *newname, *newbits;
/* Duplicate the existing font... */
newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
@ -382,6 +390,12 @@ wsfont_rotate_ccw_internal(struct wsdisplay_font *font)
*newfont = *font;
namelen = strlen(font->name) + 4;
newname = malloc(namelen, M_DEVBUF, M_WAITOK);
strlcpy(newname, font->name, namelen);
strlcat(newname, "_ccw", namelen);
newfont->name = newname;
/* Allocate a buffer big enough for the rotated font. */
newstride = (font->fontheight + 7) / 8;
newbits = malloc(newstride * font->fontwidth * font->numchars,