af422c7666
r267011: Make height and width optional arguments Now defaults to a 16x8 font size. The height and width can be specified using -h and -w respectively. r267012: Make the bold font optional r267035: Use a hash to speed up glyph deduplication Walking a linked list of all glyphs to look for a duplicate is very slow for large fonts (e.g., for CJK character sets). In my test the runtime for a sample 40000 character font went from just over 80 seconds on average to just over 2 seconds. r267119: -w sets the width, not height r267123: Support "GNU Unifont" format font data The GNU Unifont .hex format is a text file. Each line represents one glyph and consists of a four-digit hex code point, a colon, and pairs of hex digits representing the bitmap. By default an 8x16 font is assumed, with 16x16 double-width glyphs, resulting in either 32 or 64 hex digits for the bitmap. Our version of the file format supports comments at the top of the file to set the height and width: Each row of bitmap data is rounded up to byte width - for example, a 10-pixel wide font uses 4 characters per row. See http://czyborra.com/unifont/ for more background on the original format. r267126: Accept space after BITMAP in .bdf parser The Unifont BDF generator incorrectly adds a space after BITMAP, and and that error has been widely propagated. r267173: use -h height and -w width args r267298: Hide stats by default and improve error handling The font stats are interesting, but rather verbose. r267301: Speed up bold glyph map deduplication Perform an O(n) deduplication pass over the bold maps at the end, rather than walking the normal map list to look for a duplicate glyph each time a bold mapping entry is added. r267324: handle failure writing output font r267337: move to usr.bin/vtfontcvt vtfontcvt is useful for end users to convert arbitrary bitmap fonts for use by vt(4). It can also be used as a build tool, allowing us to keep the source font data in the src tree rather than uuencoded binaries. Reviewed by: ray, wblock (D183) r267366: Avoid leaking file pointer on error CID: 1222506, 1222505 r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT The _SUPPORT knobs have a consistent meaning which differs from the behaviour controlled by this knob. As the knob is opt-out and has not appeared in a release the impact should be low. r268172: correct width calculation (.hex files and commandline) r268948: Use the standard way of printing the usage string r268949: Remove redundant return statement after errx Also update vtfontcvt(8), based on inclusion in FreeBSD 10.1 Sponsored by: The FreeBSD Foundation
75 lines
2.3 KiB
Groff
75 lines
2.3 KiB
Groff
.\" Copyright (c) 2014 The FreeBSD Foundation. All rights reserved.
|
|
.\"
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd June 9, 2014
|
|
.Dt VTFONTCVT 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm vtfontcvt
|
|
.Nd "convert font files for use by the video console"
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl h Ar height
|
|
.Op Fl v
|
|
.Op Fl w Ar width
|
|
.Ar normal_font
|
|
.Op Ar bold_font
|
|
.Ar output_file
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
utility reads source font files in either BDF or Unifont HEX format and
|
|
outputs a binary font file for use by
|
|
.Xr vt 4 .
|
|
HEX format files must have the file extension
|
|
.Pa .hex .
|
|
.Pp
|
|
The following options are available:
|
|
.Bl -tag -width "12345678"
|
|
.It Fl h Ar height
|
|
Set font height.
|
|
The default is 16.
|
|
Font height is set automatically for HEX files that have a
|
|
.Ql # Height: Ar height
|
|
comment before any font data.
|
|
.It Fl v
|
|
Display verbose statistics about the converted font.
|
|
.It Fl w Ar width
|
|
Set font width.
|
|
The default is 8.
|
|
Font width is set automatically for HEX files that have a
|
|
.Ql # Width: Ar width
|
|
comment before any font data.
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr vidcontrol 1 ,
|
|
.Xr vt 4
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
utility first appeared in
|
|
.Fx 10.1 .
|