summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwlemb <wlemb>2004-01-15 07:47:22 +0000
committerwlemb <wlemb>2004-01-15 07:47:22 +0000
commitc1f6d0f6dc261b0f3120ec88c18b2250f7399bfd (patch)
tree7f2f75eb42ae811d0edd146087769c011c6dc482 /src
parenta4c583ea4c81dd82d92a02e31ab982d7fe0878f0 (diff)
downloadgroff-c1f6d0f6dc261b0f3120ec88c18b2250f7399bfd.tar.gz
* tmac/www.tmac (DC): Handle TTY devices.
* doc/webpage.ms: Document viewCVS from ffii.org. * NEWS, README: Updated. * src/roff/groff/groff.man: Mention lj4_font man page. * font/devlj4/generate/Makefile (SYMBOLMAP, WINGDINGSMAP): New variables. (FONTS): Add SYMBOL and WINGDINGS. (SYMBOL, WINGDINGS): New targets. * src/devices/grolj4/lj4_font.man: New man page. * src/devices/grolj4/Makefile.sub (MAN5): New variable. * src/devices/grolj4.man: Mention lj4_font man page. * src/utils/hpftodit/hpftodit.cpp (read_map): Handle line comments. * src/utils/hpftodit/hpftodit.man: Document it. (CW): New macro. Remove details about fonts (which are now in lj4_font.man). * font/devlj4/generate/symbol.map, font/devlj4/generate/wingdings.map: New files.
Diffstat (limited to 'src')
-rw-r--r--src/devices/grolj4/Makefile.sub1
-rw-r--r--src/devices/grolj4/grolj4.man3
-rw-r--r--src/devices/grolj4/lj4_font.man164
-rw-r--r--src/roff/groff/groff.man7
-rw-r--r--src/utils/hpftodit/hpftodit.cpp6
-rw-r--r--src/utils/hpftodit/hpftodit.man194
6 files changed, 283 insertions, 92 deletions
diff --git a/src/devices/grolj4/Makefile.sub b/src/devices/grolj4/Makefile.sub
index 9899b7a5..1216a49a 100644
--- a/src/devices/grolj4/Makefile.sub
+++ b/src/devices/grolj4/Makefile.sub
@@ -1,5 +1,6 @@
PROG=grolj4$(EXEEXT)
MAN1=grolj4.n
+MAN5=lj4_font.n
XLIBS=$(LIBDRIVER) $(LIBGROFF)
MLIB=$(LIBM)
OBJS=lj4.$(OBJEXT)
diff --git a/src/devices/grolj4/grolj4.man b/src/devices/grolj4/grolj4.man
index 267c6218..260a6198 100644
--- a/src/devices/grolj4/grolj4.man
+++ b/src/devices/grolj4/grolj4.man
@@ -1,5 +1,5 @@
.ig
-Copyright (C) 1994-2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 1994-2000, 2001, 2002, 2004 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -140,6 +140,7 @@ Macros for use with
.SH BUGS
Small dots.
.SH "SEE ALSO"
+.BR lj4_font (@MAN5EXT@),
.BR groff (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
.BR groff_out (@MAN5EXT@),
diff --git a/src/devices/grolj4/lj4_font.man b/src/devices/grolj4/lj4_font.man
new file mode 100644
index 00000000..680649c7
--- /dev/null
+++ b/src/devices/grolj4/lj4_font.man
@@ -0,0 +1,164 @@
+.tr ~
+.ig
+Copyright (C) 2004 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be included in
+translations approved by the Free Software Foundation instead of in
+the original English.
+..
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.tr ~
+.TH LJ4_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
+.\" --------------------------------------------------------------------------
+.SH NAME
+.\" --------------------------------------------------------------------------
+lj4_font \- groff fonts for use with devlj4
+.\" --------------------------------------------------------------------------
+.SH DESCRIPTION
+.\" --------------------------------------------------------------------------
+Nominally, all Hewlett-Packard LaserJet~4\(enseries and newer printers
+have the same internal fonts: 45 scalable fonts and one bitmapped
+Lineprinter font.
+The scalable fonts are available in sizes between 0.25 point and 999.75
+points, in 0.25-point increments; the Lineprinter font is available only
+in 8.5-point size.
+.LP
+The LaserJet font files included with
+.B groff
+assume that all printers since the LaserJet~4 are identical.
+There are some differences between fonts in the earlier and more recent
+printers, however.
+The LaserJet~4 printer used Agfa Intellifont technology for 35 of the
+internal scalable fonts; the remaining 10 scalable fonts were TrueType.
+Beginning with the LaserJet~4000\(enseries printers introduced in 1997,
+all scalable internal fonts have been TrueType.
+Printable glyphs differ slightly between Intellifont and TrueType fonts
+(generally, the TrueType fonts include more glyphs), and there are some
+minor differences in glyph metrics.
+Differences among printer models are described in the
+.I "PCL~5 Comparison Guide"
+and the
+.I "PCL~5 Comparison Guide Addendum"
+(for printers introduced since approximately 2001).
+.LP
+LaserJet printers access a glyph by a combination of a 256-glyph symbol
+set and an index within that symbol set.
+The printing code generated by
+.BR hpftodit (@MAN1EXT@)
+is an integer that encodes a numerical value for the symbol
+set in the high byte(s), and the index in the low byte.
+Many glyphs appear in more than one symbol set, and consequently can be
+accessed by more than one printing code; all such printing codes are
+equivalent.
+See
+.BR groff_font (@MAN5EXT@)
+for a complete description of the font file format;
+symbol sets are described in greater detail in the
+.IR "PCL~5 Printer Language Technical Reference Manual" .
+.LP
+Two of the scalable fonts, Symbol and Wingdings, are bound to
+256-character symbol sets; the remaining scalable fonts, as well as the
+Lineprinter font, support numerous symbol sets, sufficient to enable
+printing of more than 600 glyphs.
+.LP
+The metrics generated by
+.BR hpftodit (@MAN1EXT@)
+assume that the DESC file contains values of 1200 for res and 6350 for
+unitwidth (or any combination (e.g., 2400 and 3175) for which
+res~\(mu~unitwidth~=~7\|620\|000).
+Although HP PCL~5 LaserJet printers support an internal resolution of
+7200 units per inch, they use a 16-bit signed integer for cursor
+positioning; if
+.B devlj4
+is to support U.S. ledger paper (11\(sd~\(mu~17\(sd), the maximum usable
+resolution is 32\|767~/~17, or 1927, units per inch, which rounds down to
+1200 units per inch.
+If the largest required paper size is less (e.g., 8.5\(sd~\(mu~11\(sd or
+A5), a greater resolution (and lesser unitwidth) can be specified.
+.\" --------------------------------------------------------------------------
+.SH LIMITATIONS
+.\" --------------------------------------------------------------------------
+Font metrics for Intellifont fonts were provided by Tagged Font Metric
+(TFM) files originally developed by Agfa/Compugraphic.
+The TFM files provided for these fonts supported 600+ glyphs and
+contained extensive lists of kern pairs.
+.LP
+To accommodate developers who had become accustomed to TFM files, HP also
+provided TFM files for the 10 TrueType fonts included in the LaserJet~4.
+The TFM files for TrueType fonts generally included less information
+than the Intellifont TFMs, supporting fewer glyphs, and in most cases,
+providing no kerning information.
+By the time the LaserJet~4000 printer was introduced, most
+developers had migrated to other means of obtaining font metrics,
+and support for new TFM files was very limited.
+The TFM files provided for the TrueType fonts in the LaserJet~4000
+support only the Latin 2 (ISO 8859-2) symbol set, and include no kerning
+information; consequently, they are of little value for any but the most
+rudimentary documents.
+.LP
+Because the Intellifont TFM files contain considerably more information,
+they generally are preferable to the TrueType TFM files even for use
+with the TrueType fonts in the newer printers.
+The metrics for the TrueType fonts are very close, though not identical,
+to those for the earlier Intellifont fonts of the same names.
+Although most output using the Intellifont metrics with the newer
+printers is quite acceptable, a few glyphs may fail to print as
+expected.
+The differences in glyph metrics may be particularly noticeable with
+composite parentheses, brackets, and braces used by
+.BR eqn (@MAN1EXT@) .
+A script, located in
+.BR @FONTDIR@/devlj4/generate ,
+can be used to adjust the metrics for these glyphs in the special font S
+for use with printers that have all TrueType fonts.
+.LP
+At the time HP last supported TFM files, only Version 1 of the Unicode
+standard was available.
+Consequently, many glyphs lacking assigned code points were assigned by
+HP to the Private Use Area (PUA).
+Later versions of the Unicode standard included code points outside the
+PUA for many of these glyphs.
+The HP-supplied TrueType TFM files use the PUA assignments;
+TFM files generated from more recent TrueType font files require the
+later Unicode values to access the same glyphs.
+Consequently, two different mapping files may be required: one for the
+HP-supplied TFM files, and one for more recent TFM files.
+.\" --------------------------------------------------------------------------
+.SH FILES
+.\" --------------------------------------------------------------------------
+.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n
+.B @FONTDIR@/devlj4/DESC
+Device description file.
+.TP
+.BI @FONTDIR@/devlj4/ F
+Font description file for font
+.IR F .
+.\" --------------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------------
+.ad 0
+.BR groff (@MAN1EXT@),
+.BR groff_diff (@MAN1EXT@),
+.BR hpftodit (@MAN1EXT@),
+.BR grolj4 (@MAN1EXT@),
+.BR groff_font (@MAN5EXT@)
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index f8bc421a..e3bf0946 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1,9 +1,9 @@
.ig
groff.man
-Last update: 12 Oct 2003
+Last update: 13 Jan 2004
-Copyright (C) 1989, 2002, 2003 Free Software Foundation, Inc.
+Copyright (C) 1989, 2002, 2003, 2004 Free Software Foundation, Inc.
Rewritten in 2002 by Bernd Warken <bwarken@mayn.de>
Permission is granted to copy, distribute and/or modify this document
@@ -1519,7 +1519,7 @@ This is the only grap version supported by groff.
.SH AUTHORS
.\" --------------------------------------------------------------------
.
-Copyright \(co 1989, 2002, 2003 Free Software Foundation, Inc.
+Copyright \(co 1989, 2002, 2003, 2004 Free Software Foundation, Inc.
.
.P
This document is distributed under the terms of the FDL (GNU Free
@@ -1623,6 +1623,7 @@ Postprocessors for the output devices:
.BR \%grohtml (@MAN1EXT@),
.BR \%grolbp (@MAN1EXT@),
.BR \%grolj4 (@MAN1EXT@),
+.BR \%lj4_font (@MAN5EXT@),
.BR \%grops (@MAN1EXT@),
.BR \%grotty (@MAN1EXT@).
.
diff --git a/src/utils/hpftodit/hpftodit.cpp b/src/utils/hpftodit/hpftodit.cpp
index 229ce69b..718af5aa 100644
--- a/src/utils/hpftodit/hpftodit.cpp
+++ b/src/utils/hpftodit/hpftodit.cpp
@@ -1400,8 +1400,12 @@ read_map(const char *file, const int tfm_type)
charcode_name_table[i] = NULL;
}
- for (; ptr; ptr = strtok(NULL, " \n\t"))
+ // a '#' that isn't the first groff name begins a comment
+ for (int names = 1; ptr; ptr = strtok(NULL, " \n\t")) {
+ if (names++ > 1 && *ptr == '#')
+ break;
charcode_name_table[n] = new name_list(ptr, charcode_name_table[n]);
+ }
}
fclose(fp);
return 1;
diff --git a/src/utils/hpftodit/hpftodit.man b/src/utils/hpftodit/hpftodit.man
index b914db9e..429f516d 100644
--- a/src/utils/hpftodit/hpftodit.man
+++ b/src/utils/hpftodit/hpftodit.man
@@ -1,6 +1,6 @@
.tr ~
.ig
-Copyright (C) 1994-2000, 2001, 2003 Free Software Foundation, Inc.
+Copyright (C) 1994-2000, 2001, 2003, 2004 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -23,6 +23,11 @@ the original English.
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
+.de CW
+.ie \\n(.$>2 \&\\$1\f(CR\\$2\fP\\$3
+.el \&\f(CR\\$1\fP\\$2
+..
+.tr ~
.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
.\" --------------------------------------------------------------------------
.SH NAME
@@ -49,18 +54,22 @@ option and its parameter.
.SH DESCRIPTION
.\" --------------------------------------------------------------------------
.B hpftodit
-creates a font file for use with an HP LaserJet printer with
+creates a font file for use with a Hewlett-Packard LaserJet~4\(enseries
+(or newer) printer with
.BR "groff \-Tlj4" ,
using data from an HP tagged font metric (TFM) file.
.I tfm_file
-is the name of the tagged font metric file for the font; Intellifont and
+is the name of the TFM file for the font; Intellifont and
TrueType TFM files are supported, but symbol set TFM files are not.
.I map_file
is a file giving the groff names for characters in the font; this file
should consist of a sequence of lines of the form:
.IP
.I
-m u c1 c2 \fR.\|.\|.
+m u c1 c2 \fR.\|.\|. [
+.CW #
+.I comment
+]
.LP
where
.I m
@@ -69,28 +78,62 @@ is a decimal integer giving the MSL number of the character,
is a hexadecimal integer giving the Unicode value of the character,
and
.IR c1 ,
-.IR c2 ,.\|.\|.
+.IR c2 ", .\|.\|."
are the groff names of the character.
The values can be separated by any whitespace; the Unicode value must
-use uppercase digits A\^\(en\^F, and must be without a leading `0x', `u', or
-\&`U+'.
+use uppercase digits A\^\(en\^F, and must be without a leading
+.CW ` 0x ',
+.CW ` u ',
+or
+.CW ` U+ '.
+Unicode values corresponding to composite glyphs are decomposed; e.g.,
+.CW ` u00C0 '
+becomes
+.CW ` u0041_0300 '.
The name for a glyph without a groff name may be given as
-.RI u XXXX
+.CW u \fIXXXX\fP
if the glyph corresponds to a Unicode value, or as an unnamed glyph
-`\-\^\-\^\-'.
+.CW ` --- '.
If the given Unicode value is in the Private Use Area
(0xE000\^\(en\^0xF8FF), the glyph is included as an unnamed glyph.
Refer to
.BR groff_diff (@MAN1EXT@)
for additional information about unnamed glyphs and how to access them.
.LP
+Blank lines and lines beginning with
+.CW ` # '
+are ignored.
+A
+.CW ` # '
+following one or more groff names begins a comment.
+Because
+.CW ` # '
+is a valid groff name, it must appear first in a list of
+groff names if a comment is included, e.g.,
+.IP
+.CW "3 0023 # # number sign"
+.LP
+or
+.IP
+.CW "3 0023 # sh # number sign"
+.LP
+rather than
+.IP
+.CW "3 0023 sh # # number sign"
+.LP
+which will treat the first
+.CW ` # '
+as the beginning of the comment.
+.LP
.I font
is the name of the groff font file.
The groff font file is written to
.IR font ;
if
.I font
-is specified as `\-', the output is written to the standard output.
+is specified as
+.CW ` - ',
+the output is written to the standard output.
.LP
The
.B \-s
@@ -113,50 +156,43 @@ If the
.B \-i
option is used,
.B hpftodit
-will automatically generate an italic correction,
+automatically will generate an italic correction,
a left italic correction and a subscript correction
for each character
(the significance of these parameters is explained in
.BR groff_font (@MAN5EXT@)).
-.LP
-The metrics generated by
-.B hpftodit
-assume that the DESC file contains values of 1200 for res and 6350 for
-unitwidth (or any combination (e.g., 2400 and 3175) for which
-res~\(mu~unitwidth~=~7\|620\|000).
-Although HP PCL 5 LaserJet printers support an internal resolution of
-7200 units per inch, they use a 16-bit signed integer for cursor
-positioning; if
-.B devlj4
-is to support U.S. ledger paper (11\(sd~\(mu~17\(sd), the maximum usable
-resolution is 32\|767~/~17, or 1927, units per inch, which rounds down to
-1200 units per inch.
-If the largest required paper size is less (e.g., 8.5\(sd~\(mu~11\(sd or
-A5), a greater resolution (and lesser unitwidth) can be specified.
.\" --------------------------------------------------------------------------
.SH OPTIONS
.\" --------------------------------------------------------------------------
.TP
.B \-a
-Include characters in the TFM file that do not have groff names and are
-not included in the map file.
+Include characters in the TFM file that are not included in the map
+file.
A glyph with corresponding Unicode value is given the name
.RI u XXXX ;
a glyph without a Unicode value is included as an unnamed glyph
-`\-\^\-\^\-'.
-A glyph with a Unicode value in the Private Use Area (0xE000\^\(en\^0xF8FF)
-also is included as an unnamed glyph.
-This option has no effect on Unicode-named or unnamed glyphs that are
-specified in the map file.
+\&`\-\^\-\^\-'.
+A glyph with a Unicode value in the Private Use Area
+(0xE000\^\(en\^0xF8FF) also is included as an unnamed glyph.
.IP
This option provides a simple means of adding Unicode-named and unnamed
glyphs to a font without including them in the map file, but it affords
little control over which glyphs are placed in a regular font and which
are placed in a special font.
-Although the presence or absence of the
+The presence or absence of the
.B \-s
-option has some effect on which glyphs are included, it isn't very
+option has some effect on which glyphs are included: without the
+.B \-s
+option, only the \(lqtext\(rq symbol sets are searched for matching
+glyphs; with the
+.B \-s
+option, only the \(lqmathematical\(rq symbol sets
+are searched.
+Nonetheless, restricting the symbol sets searched isn't very
selective\(emmany glyphs are placed in both regular and special fonts.
+Normally, the
+.B \-a
+option should be used only as a last resort.
.\" --------------------------------------------------------------------------
.TP
.B \-d
@@ -172,11 +208,23 @@ per em for TrueType fonts.
Note that the accessibility of a glyph depends on its inclusion in a
symbol set; some TFM files list many glyphs but only a few symbol sets.
.IP
-With this option,
+The glyph listing includes the glyph index within the TFM file, the MSL
+or Unicode value, and the symbol set and character code that will be
+used to print the glyph.
+If
.I map_file
-and
+is given,
+groff names are given for matching glyphs.
+If only the glyph index and MSL or Unicode value are given, the glyph
+does not appear in any supported symbol set and cannot be printed.
+.IP
+With the
+.B \-d
+option,
+.I map_file
+is optional, and
.I font
-are not required, and are ignored if given.
+is ignored if given.
.\" --------------------------------------------------------------------------
.TP
.B \-q
@@ -190,23 +238,32 @@ to the standard output.
.\" --------------------------------------------------------------------------
.TP
.B \-v
-Print the version number.
+Print the
+.B hpftodit
+version number.
.\" --------------------------------------------------------------------------
.TP
.B \-s
The font is special.
This option adds the
.B special
-command to the font file, and affects the HP symbol sets that are
-searched for each glyph.
+command to the font file, and affects the order in which HP symbol sets
+are searched for each glyph.
+Without the
+.B \-s
+option, the \(lqtext\(rq sets are searched before
+the \(lqmathematical\(rq symbol sets.
+With the
+.B \-s
+option, the search order is reversed.
.\" --------------------------------------------------------------------------
.TP
.BI \-i n
Generate an italic correction for each character so that the character's
width plus the character's italic correction is equal to
.I n
-thousandths of an em plus the amount by which the right edge of the character's
-bounding is to the right of the character's origin.
+thousandths of an em plus the amount by which the right edge of the
+character's bounding is to the right of the character's origin.
If this would result in a negative italic correction, use a zero italic
correction instead.
.IP
@@ -229,62 +286,25 @@ a value of 50 (0.05 em) usually is a reasonable choice.
.\" --------------------------------------------------------------------------
.SH FILES
.\" --------------------------------------------------------------------------
-.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n
+.ad 0
+.TP \w'\fB@FONTDIR@/devlj4/generate/\fP\fI*\fP.map'u+2n
.B @FONTDIR@/devlj4/DESC
Device description file.
.TP
.BI @FONTDIR@/devlj4/ F
Font description file for font
.IR F .
-.\" --------------------------------------------------------------------------
-.SH LIMITATIONS
-.\" --------------------------------------------------------------------------
-Although
-.B hpftodit
-can read TrueType TFM files, most of the HP-supplied TFM files for
-TrueType fonts support relatively few glyphs and include little, if any,
-kerning information.
-When the HP LaserJet 4 printer was first introduced, most of the
-internal scalable fonts were Agfa Intellifont.
-The TFM files provided for these fonts supported 600+ glyphs and
-contained extensive lists of kern pairs.
-.LP
-All scalable internal fonts on LaserJet printers introduced since
-approximately 1996 have been TrueType.
-With most developers using other means of obtaining font metrics by that
-time, support for new TFM files was very limited.
-The TFM files provided for the TrueType fonts support only the Latin 2
-(ISO 8859-2) symbol set, and include no kerning information;
-consequently, they are of little value for any but the most rudimentary
-documents.
-.LP
-Because the Intellifont TFM files contain considerably more information,
-they generally are preferable to the TrueType TFM files even for the
-TrueType fonts in the newer printers.
-The metrics for the TrueType fonts are very close, though not identical,
-to those for the earlier Intellifont fonts of the same names.
-Although most output using the Intellifont metrics with the newer
-printers is quite acceptable, a few glyphs may fail to print as expected.
-.LP
-At the time HP last supported TFM files, only Version 1 of the Unicode
-standard was available.
-Consequently, many glyphs lacking assigned code points were assigned by
-HP to the Private Use Area (PUA).
-Later versions of the Unicode standard included code points outside the
-PUA for many of these glyphs.
-The HP-supplied TrueType TFM files use the PUA assignments;
-TFM files generated from more recent TrueType font files require the
-later Unicode values to access the same glyphs.
-Consequently, two different mapping files may be required: one for the
-HP-supplied TFM files, and one for more recent TFM files.
+.TP
+.BI @FONTDIR@/devlj4/generate/ * .map
+Symbol mapping files
.\" --------------------------------------------------------------------------
.SH "SEE ALSO"
.\" --------------------------------------------------------------------------
-.ad 0
.BR groff (@MAN1EXT@),
.BR groff_diff (@MAN1EXT@),
.BR grolj4 (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@)
+.BR groff_font (@MAN5EXT@),
+.BR lj4_font (@MAN5EXT@)
.
.\" Local Variables:
.\" mode: nroff