conf/90082: [syscons] [patch] curses ACS line graphics support for
iso15 fonts
Oliver Fromme
olli at secnetix.de
Wed Dec 7 10:12:19 PST 2005
>Number: 90082
>Category: conf
>Synopsis: [syscons] [patch] curses ACS line graphics support for iso15 fonts
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 07 18:10:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Oliver Fromme
>Release: FreeBSD 6.0-STABLE i386
>Organization:
secnetix GmbH & Co. KG, Munich, Germany
http://www.secnetix.de/bsd
>Environment:
The solution presented in this PR has been developed
and tested under RELENG_6 (6.0-STABLE), but it is
believed to apply to all versions from RELENG_4 to
-current (HEAD).
>Description:
Most users in western and central Europe use the
"iso15" syscons fonts. Those fonts don't contain
the line drawing characters which are present in
e.g. the cp437 fonts and are used by various
console-based "GUI" programs, including sysinstall,
the famous midnight commander and others. Instead,
simple ASCII characters such as "+" and "-" are
used, which looks ugly.
In the past years, a lot of users have complained
about that problem (e.g. on the German BSD mailing
lists; note that German requires an iso15 font).
It was often mentioned that Linux does not suffer
from the same problem.
The fix below consists of a script that adds the
missing characters to the existing iso15-8x*.fnt
font files. In conjunction with an appropriate
termcap entry, the problem is solved.
>How-To-Repeat:
Enable one of the "iso15" fonts (vidcontrol -l) and
set TERM=cons25l1. Then run sysinstall,midnight
commander or any other curses based program that
uses line drawing characters for window borders or
similar.
>Fix:
The following script merges line drawing characters from
the cp437 fonts into the iso15 fonts. The following
files are modified:
iso15-8x8.fnt
iso15-8x14.fnt
iso15-8x16.fnt
The script must be run in a directory containing the
existing font files, i.e. either in
/usr/share/syscons/fonts
or in the source tree:
/usr/src/share/syscons/fonts
The new characters are placed in an unused range of the
iso15 fonts, beginning at position 128 (0x80). All
existing characters are preserved, so the change should
be without any risk.
The "cons25l1" entry in the termcap must be changed
like this (and don't forget to rebuilt termcap.db with
cap_mkdb(1), and logout+login after the change so the
TERMCAP variable in your environment gets updated):
cons25l1|cons25-iso8859-1:\
:ac=l\200m\201k\202j\203t\204u\205v\206w\207q\210x\211n\212`\213a\214f\260g\261~\267,\215+\216.\217-\220h\221i\2470\222y\223z\224{\225}\243:\
:tc=cons25w:
Note: The termcap source directory is /usr/src/share/termcap.
Here's the script to modify the fonts:
#!/bin/sh -
set -e
ACS_START=128
CP437_SRC="218 192 191 217 195 180 193 194 196 179 197
4 176 27 26 25 24 177 219 243 242 227"
for H in 8 14 16; do
CP437="cp437-8x$H"
ISO15="iso15-8x$H"
DD_ARGS="if=$CP437 of=$ISO15 bs=$H count=1 conv=notrunc"
uudecode -p $CP437.fnt > $CP437
uudecode -p $ISO15.fnt > $ISO15
DST="$ACS_START"
for SRC in $CP437_SRC; do
dd $DD_ARGS skip=$SRC seek=$DST 2>/dev/null
DST=$(( $DST + 1 ))
done
uuencode $ISO15 $ISO15 > $ISO15.fnt
rm $CP437 $ISO15
done
#END.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list