summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixRFont.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixRFont.c')
-rw-r--r--unix/tkUnixRFont.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 2557ab0..cd4a4f0 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixRFont.c,v 1.8 2004/11/28 19:00:49 jenglish Exp $
+ * RCS: @(#) $Id: tkUnixRFont.c,v 1.9 2005/04/19 05:50:06 jenglish Exp $
*/
#include "tkUnixInt.h"
@@ -511,15 +511,15 @@ Tk_MeasureChars(tkfont, source, numBytes, maxLength, flags, lengthPtr)
curByte = 0;
sawNonSpace = 0;
while (numBytes > 0) {
- clen = FcUtf8ToUcs4((FcChar8 *) source, &c, numBytes);
+ Tcl_UniChar unichar;
+
+ clen = Tcl_UtfToUniChar(source, &unichar);
+ c = (FcChar32)unichar;
if (clen <= 0) {
- /*
- * This should not happen, but it can, due to bugs in Tcl
- * (i.e., [encoding convertfrom identity]).
- */
+ /* This can't happen (but see #1185640) */
*lengthPtr = curX;
- return ++curByte;
+ return curByte;
}
source += clen;