summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-13 17:54:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-13 17:54:06 (GMT)
commit744eaf4fe647fb18ea2bfcfae3371a301136db47 (patch)
tree3eaccf823f5b289234015c541385d6d53faf8429 /win
parentded849032ef8207aae7f1a111b78041de49fffcf (diff)
downloadtk-744eaf4fe647fb18ea2bfcfae3371a301136db47.zip
tk-744eaf4fe647fb18ea2bfcfae3371a301136db47.tar.gz
tk-744eaf4fe647fb18ea2bfcfae3371a301136db47.tar.bz2
increase FONATMAP_PAGES so it can hold 3 planes of Unicode characters in stead of just one. This appears to be one cause for crashes.
Diffstat (limited to 'win')
-rw-r--r--win/tkWinFont.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index ad7738f..4351f99 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -28,8 +28,8 @@
#define FONTMAP_SHIFT 10
-#define FONTMAP_PAGES (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
#define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT)
+#define FONTMAP_PAGES (0x30000 / FONTMAP_BITSPERPAGE)
typedef struct FontFamily {
struct FontFamily *nextPtr; /* Next in list of all known font families. */
@@ -1943,8 +1943,7 @@ FindSubFontForChar(
SubFont *subFontPtr;
Tcl_DString ds;
-
- if ((ch < BASE_CHARS) || (ch >= 0x10000)) {
+ if ((ch < BASE_CHARS) || (ch >= 0x30000)) {
return &fontPtr->subFontArray[0];
}