diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-19 09:37:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-19 09:37:41 (GMT) |
commit | 2697ce46a4ddd06efb4c543aeeee43b6f3dcf94b (patch) | |
tree | cd34203607d773c93b4d005267244fe53ac6c48d /win | |
parent | 3940e4685d7a460eaf0f35906fa890537bfc3f84 (diff) | |
download | tk-2697ce46a4ddd06efb4c543aeeee43b6f3dcf94b.zip tk-2697ce46a4ddd06efb4c543aeeee43b6f3dcf94b.tar.gz tk-2697ce46a4ddd06efb4c543aeeee43b6f3dcf94b.tar.bz2 |
Increase FONTMAP_PAGES from 192 to 256, making room for Unicode 13 plane 3.
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); |