summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-02-25 06:49:22 +0000
committerwlemb <wlemb>2003-02-25 06:49:22 +0000
commit13c738d1f14c49524dfefce85c51c09d2b8591ea (patch)
treeae963d0b92f1daf099bb18e5ee7279772e920bfd /src/utils
parent9b7b817a21a78f7532a5836b94a0b4333b0d7571 (diff)
downloadgroff-13c738d1f14c49524dfefce85c51c09d2b8591ea.tar.gz
Contrary to the PCL5 Developer's Guide, the ascenders in TFM files
can be negative also. * src/utils/hpftodit/hpftodit.cc (char_info): `ascent' must be `int16'. (read_char_table): Avoid negative ascenders. (output_charset): Add cast. * font/devlj4/*: Regenerated. Replace unnamed glyphs for DVI fonts with `uXXXX' glyph names where possible. * font/devdvi/generate/{tc,texttt,ec,texmi,texsy,textex}.map: Do it. * font/devdvi/generate/textex.map: Map glyph 23 to `u21C6' instead of `<>'. * font/devdvi/*: Regenerated. Map `la' and `ra' to U+27E8 and U+27E9. These two characters have normal width, while the previously used characters (U+2329 and U+232A) are classified as wide due to canonical equivalence with the CJK punctuation characters U+3008 and U+3009. * font/devutf8/R.proto: Updated. * src/roff/troff/uniglyph.cc, src/roff/troff/glyphuni.cc: Ditto. * man/groff_char.man: Simplify handling of table traps by introducing `start block' and `end block' macros. (Ns, Ne, 2s, 2e, Ds, De): New macros. (DL): Make it work with Unix troff also. Fix code values of `la' and `ra'. * tmac/dvi.tmac: Define `<>' for CW and CWI.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/hpftodit/hpftodit.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/hpftodit/hpftodit.cc b/src/utils/hpftodit/hpftodit.cc
index ecbc8a8a..fe512b61 100644
--- a/src/utils/hpftodit/hpftodit.cc
+++ b/src/utils/hpftodit/hpftodit.cc
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
This file is part of groff.
@@ -121,7 +121,7 @@ struct entry {
struct char_info {
uint16 msl;
uint16 width;
- uint16 ascent;
+ int16 ascent;
int16 descent;
int16 left_extent;
uint16 right_extent;
@@ -485,6 +485,8 @@ void read_char_table(File &f)
f.seek(tag_info(ascent_tag).value);
for (i = 0; i < nchars; i++) {
char_table[i].ascent = f.get_uint16();
+ if (char_table[i].ascent < 0)
+ char_table[i].ascent = 0;
}
require_tag(descent_tag);
@@ -694,7 +696,7 @@ void output_charset()
printf(",%d", depth);
// This is fairly arbitrary. Fortunately it doesn't much matter.
unsigned type = 0;
- if (char_table[i].ascent > (tag_info(lower_ascent_tag).value*9)/10)
+ if (char_table[i].ascent > (int16(tag_info(lower_ascent_tag).value)*9)/10)
type |= 2;
if (char_table[i].descent < (int16(tag_info(lower_descent_tag).value)*9)/10)
type |= 1;