summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkFont.c1
-rw-r--r--tests/entry.test5
-rw-r--r--tests/font.test12
-rw-r--r--win/tkWinFont.c3
4 files changed, 20 insertions, 1 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 7f2715b..51b2fce 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -13,6 +13,7 @@
#include "tkInt.h"
#include "tkFont.h"
+#include <windows.h>
/*
* The following structure is used to keep track of all the fonts that exist
diff --git a/tests/entry.test b/tests/entry.test
index d27ffb5..1be1d2d 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -2920,6 +2920,11 @@ test entry-16.4 {EntryVisibleRange procedure} -body {
} -cleanup {
destroy .e
} -result {0.000000 1.000000}
+test entry-16.5 {Unicode handling in entry widget} -body {
+ entry .e -show abc
+} -cleanup {
+ destroy .e
+} -result {0.000000 1.000000}
test entry-17.1 {EntryUpdateScrollbar procedure} -body {
diff --git a/tests/font.test b/tests/font.test
index 9e44a93..23e09c4 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -145,6 +145,18 @@ test font-4.10 {font command: actual} -constraints win -body {
test font-4.11 {font command: bad option} -body {
font actual xyz -style
} -returnCodes error -result {bad option "-style": must be -family, -size, -weight, -slant, -underline, or -overstrike}
+test font-4.12 {font command: actual} -body {
+ font actual {-family times} -- \ud800
+} -match glob -result {*}
+test font-4.13 {font command: actual} -body {
+ font actual {-family times} -- \udc00
+} -match glob -result {*}
+test font-4.14 {font command: actual} -constraints win -body {
+ font actual {-family times} -family -- \ud800\udc00
+} -result {Times New Roman}
+test font-4.15 {font command: actual} -body {
+ font actual {-family times} -- \udc00\ud800
+} -returnCodes 1 -match glob -result {expected a single character but got "*"}
test font-5.1 {font command: configure} -body {
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 43c4834..47c4c3c 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -1940,7 +1940,8 @@ FindSubFontForChar(
SubFont *subFontPtr;
Tcl_DString ds;
- if (ch < BASE_CHARS) {
+
+ if ((ch < BASE_CHARS) || (ch >= 0x10000)) {
return &fontPtr->subFontArray[0];
}