summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-05-13 00:02:25 (GMT)
committerhobbs <hobbs>2000-05-13 00:02:25 (GMT)
commit39af61f56cd2013861853dd736c0764c3737f865 (patch)
tree71b406d32317fe026dc65a9bcba4101ca0a3a293
parente72f171483d7267e1822e7cc24fd2518db690814 (diff)
downloadtk-39af61f56cd2013861853dd736c0764c3737f865.zip
tk-39af61f56cd2013861853dd736c0764c3737f865.tar.gz
tk-39af61f56cd2013861853dd736c0764c3737f865.tar.bz2
* win/tkWinFont.c (LoadFontRanges): improved support for all chars
in 0-255 range for bitmap ANSI fonts. May be improved to handle bitmap non-ANSI fonts in the future. [Bug: 2172]
-rw-r--r--win/tkWinFont.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 84867ad..a99d965 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinFont.c,v 1.10 2000/04/07 20:57:10 hobbs Exp $
+ * RCS: @(#) $Id: tkWinFont.c,v 1.11 2000/05/13 00:02:25 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -2314,6 +2314,17 @@ LoadFontRanges(
}
}
}
+ } else if (GetTextCharset(hdc) == ANSI_CHARSET) {
+ /*
+ * Bitmap font. We should also support ranges for the other
+ * *_CHARSET values.
+ */
+ segCount = 1;
+ cbData = segCount * sizeof(USHORT);
+ startCount = (USHORT *) ckalloc(cbData);
+ endCount = (USHORT *) ckalloc(cbData);
+ startCount[0] = 0x0000;
+ endCount[0] = 0x00ff;
}
SelectObject(hdc, hFont);