summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 07:49:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 07:49:21 (GMT)
commit3c2139408891a7cf7678b88d372ac122aa79f65d (patch)
tree0c7c6348e421d05be040ec77ef8a7200c85c391d /unix/tkUnixFont.c
parent97a56e265e68f569c3e39c1e3c7f07d6c395f45f (diff)
downloadtk-3c2139408891a7cf7678b88d372ac122aa79f65d.zip
tk-3c2139408891a7cf7678b88d372ac122aa79f65d.tar.gz
tk-3c2139408891a7cf7678b88d372ac122aa79f65d.tar.bz2
Patch from Christian Werner, for evaluation
Diffstat (limited to 'unix/tkUnixFont.c')
-rw-r--r--unix/tkUnixFont.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index a6826b5..b10fddd 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -35,9 +35,13 @@ static const char *const encodingList[] = {
* family": the foundry, face name, and charset.
*/
+#if TCL_UTF_MAX > 3
+#define FONTMAP_SHIFT 12
+#define FONTMAP_PAGES (1 << (21 - FONTMAP_SHIFT))
+#else
#define FONTMAP_SHIFT 10
-
#define FONTMAP_PAGES (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
+#endif
#define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT)
typedef struct FontFamily {