diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinFont.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 7b70a08..aae34a7 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -29,7 +29,8 @@ #define FONTMAP_SHIFT 10 #define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT) -#define FONTMAP_PAGES (0x30000 / FONTMAP_BITSPERPAGE) +#define FONTMAP_NUMCHARS 0x40000 +#define FONTMAP_PAGES (FONTMAP_NUMCHARS / FONTMAP_BITSPERPAGE) typedef struct FontFamily { struct FontFamily *nextPtr; /* Next in list of all known font families. */ @@ -1920,7 +1921,7 @@ FindSubFontForChar( SubFont *subFontPtr; Tcl_DString ds; - if ((ch < BASE_CHARS) || (ch >= 0x30000)) { + if ((ch < BASE_CHARS) || (ch >= FONTMAP_NUMCHARS)) { return &fontPtr->subFontArray[0]; } @@ -2090,7 +2091,7 @@ FontMapLookup( { int row, bitOffset; - if (ch < 0 || ch >= 0x30000) { + if (ch < 0 || ch >= FONTMAP_NUMCHARS) { return 0; } @@ -2134,7 +2135,7 @@ FontMapInsert( { int row, bitOffset; - if (ch >= 0 && ch < 0x30000) { + if (ch >= 0 && ch < FONTMAP_NUMCHARS) { row = ch >> FONTMAP_SHIFT; if (subFontPtr->fontMap[row] == NULL) { FontMapLoadPage(subFontPtr, row); |