diff options
author | dawes <dawes> | 2000-06-15 20:49:55 +0000 |
---|---|---|
committer | dawes <dawes> | 2000-06-15 20:49:55 +0000 |
commit | 86c170a1d3f8adea498221cf62330d6b36ca6719 (patch) | |
tree | 321619dc7c2f4f4c74e4b1c4aab003b088cfff90 /programs/fstobdf | |
parent | c20845f9ec6b118c6c2679b42b7600fd3abafbed (diff) |
296. Add a Macedonian xkb symbols file (#A.96, Zlatko Trajceski).
295. Fix a buffer overflow with the -xkbmap X server flag (#A.91,
Trevor Johnson).
294. Fix a rectangle fill problem that shows up with an AGP SiS 6326
(A.81, A.83, Milivoj Savin).
293. Fix a problem in xcalc when the current locale uses a character
other than "." for the decimal point (#A.63, Stanislav Brabec).
292. Allow some more parameters in linux.cf and lnxLib.rules to be
redefined (#A.60, Stanislav Brabec).
291. Fix a typo in lib/Xss/Imakefile (#A.59, Stanislav Brabec).
290. Fix an xfs crash that shows up when many clients connect (#A.48,
Remy Card).
289. Fix some man page build problems (#A.43, Ian Collier).
288. Fix xedit core dump (in Xaw) on Solaris, related to the bsearch()
usage (#A.42, Ian Collier).
286. Fix problems when building on Solaris 2.6/sparc and Irix 6.5.5
(#A.21, A.28, Sullivan N. Beck).
285. Fix a core dump in fstobdf when using 16 bit fonts (#A.25,
Morten Storgaard Nielsen).
Diffstat (limited to 'programs/fstobdf')
-rw-r--r-- | programs/fstobdf/chars.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/programs/fstobdf/chars.c b/programs/fstobdf/chars.c index eef9ea509..32260f343 100644 --- a/programs/fstobdf/chars.c +++ b/programs/fstobdf/chars.c @@ -39,7 +39,9 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/fstobdf/chars.c,v 3.3 1998/10/04 09:40:05 dawes Exp $ */ +/* $XFree86: xc/programs/fstobdf/chars.c,v 3.4 1999/02/19 21:27:08 hohndel Exp $ */ + +/* Morten Storgaard Nielsen: chars.c,v 3.2-1 2000/01/30 14:11:19 kat Exp */ #include <stdio.h> #include <X11/Xlib.h> @@ -159,19 +161,22 @@ EmitCharacters(FILE *outFile, unsigned char *glyph; unsigned char *glyphs; unsigned int nChars; - int firstChar; - int lastChar; - int ch; + int firstCharLow; + int firstCharHigh; + int lastCharLow; + int lastCharHigh; + int chLow; + int chHigh; FSBitmapFormat format; nChars = 0; format = BYTE_ORDER | BIT_ORDER | SCANLINE_UNIT | SCANLINE_PAD | EXTENTS; - firstChar = (fontHeader->char_range.min_char.high << 8) - + fontHeader->char_range.min_char.low; - lastChar = (fontHeader->char_range.max_char.high << 8) - + fontHeader->char_range.max_char.low; + firstCharLow = fontHeader->char_range.min_char.low; + firstCharHigh = fontHeader->char_range.min_char.high; + lastCharLow = fontHeader->char_range.max_char.low; + lastCharHigh = fontHeader->char_range.max_char.high; (void) FSQueryXExtents16(fontServer, fontID, True, (FSChar2b *) 0, 0, &extents); @@ -180,10 +185,12 @@ EmitCharacters(FILE *outFile, charInfo = extents; /* calculate the actual number of chars */ - for (ch = 0; ch <= (lastChar - firstChar); ch++) { + for (chHigh = 0; chHigh <= (lastCharHigh-firstCharHigh); chHigh++) { + for (chLow = 0; chLow <= (lastCharLow-firstCharLow); chLow++) { if ((charInfo->width != 0) || (charInfo->left != charInfo->right)) nChars++; charInfo++; + } } fprintf(outFile, "CHARS %u\n", nChars); @@ -192,19 +199,19 @@ EmitCharacters(FILE *outFile, * actually emit the characters */ charInfo = extents; - encoding = firstChar; glyph = glyphs; - for (ch = 0; ch <= (lastChar - firstChar); ch++) { + for (chHigh = firstCharHigh; chHigh <= lastCharHigh; chHigh++) { + for (chLow = firstCharLow; chLow <= lastCharLow; chLow++) { int bpr; bpr = GLWIDTHBYTESPADDED((charInfo->right - charInfo->left), SCANLINE_PAD_BYTES); + encoding=(chHigh << 8)+chLow; if ((charInfo->width != 0) || (charInfo->right != charInfo->left)) EmitBitmap(outFile, fontHeader, charInfo, encoding, bpr, glyph); glyph += (charInfo->descent + charInfo->ascent) * bpr; - charInfo++; - encoding++; + } } FSFree((char *) extents); FSFree((char *) glyphs); |