summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-24 16:08:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-24 16:08:15 (GMT)
commita820220b3d4be7f09e9eb56fa090642f316bf3fb (patch)
tree2b32739d41f5970b16ba31fffd44a398dee08481 /generic/tkFont.c
parentd6d676512fab10d31a6fc83012b29505d11a3a89 (diff)
downloadtk-a820220b3d4be7f09e9eb56fa090642f316bf3fb.zip
tk-a820220b3d4be7f09e9eb56fa090642f316bf3fb.tar.gz
tk-a820220b3d4be7f09e9eb56fa090642f316bf3fb.tar.bz2
::tk::startOfCluster/::tk::endOfCluster are now giving the correct result on ICU 68 (or ICU 64 on XQuarz)
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 6664cbb..c717ff8 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -1993,7 +1993,7 @@ Tk_ComputeTextLayout(
height = fmPtr->ascent + fmPtr->descent;
if (numChars < 0) {
- numChars = Tcl_NumUtfChars(string, -1);
+ numChars = TkNumUtfChars(string, -1);
}
if (wrapLength == 0) {
wrapLength = -1;
@@ -2016,7 +2016,7 @@ Tk_ComputeTextLayout(
curX = 0;
- endp = Tcl_UtfAtIndex(string, numChars);
+ endp = TkUtfAtIndex(string, numChars);
special = string;
flags &= TK_IGNORE_TABS | TK_IGNORE_NEWLINES;
@@ -2133,7 +2133,7 @@ Tk_ComputeTextLayout(
bytesThisChunk = Tk_MeasureChars(tkfont, end, bytesThisChunk,
-1, 0, &chunkPtr->totalWidth);
chunkPtr->numBytes += bytesThisChunk;
- chunkPtr->numChars += Tcl_NumUtfChars(end, bytesThisChunk);
+ chunkPtr->numChars += TkNumUtfChars(end, bytesThisChunk);
chunkPtr->totalWidth += curX;
}
}
@@ -2324,14 +2324,14 @@ Tk_DrawTextLayout(
firstChar = 0;
firstByte = chunkPtr->start;
} else {
- firstByte = Tcl_UtfAtIndex(chunkPtr->start, firstChar);
+ firstByte = TkUtfAtIndex(chunkPtr->start, firstChar);
Tk_MeasureChars(layoutPtr->tkfont, chunkPtr->start,
firstByte - chunkPtr->start, -1, 0, &drawX);
}
if (lastChar < numDisplayChars) {
numDisplayChars = lastChar;
}
- lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars);
+ lastByte = TkUtfAtIndex(chunkPtr->start, numDisplayChars);
#ifdef TK_DRAW_IN_CONTEXT
TkpDrawCharsInContext(display, drawable, gc, layoutPtr->tkfont,
chunkPtr->start, chunkPtr->numBytes,
@@ -2394,14 +2394,14 @@ TkDrawAngledTextLayout(
firstChar = 0;
firstByte = chunkPtr->start;
} else {
- firstByte = Tcl_UtfAtIndex(chunkPtr->start, firstChar);
+ firstByte = TkUtfAtIndex(chunkPtr->start, firstChar);
Tk_MeasureChars(layoutPtr->tkfont, chunkPtr->start,
firstByte - chunkPtr->start, -1, 0, &drawX);
}
if (lastChar < numDisplayChars) {
numDisplayChars = lastChar;
}
- lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars);
+ lastByte = TkUtfAtIndex(chunkPtr->start, numDisplayChars);
#ifdef TK_DRAW_IN_CONTEXT
dx = cosA * (chunkPtr->x) + sinA * (chunkPtr->y);
dy = -sinA * (chunkPtr->x) + cosA * (chunkPtr->y);
@@ -2654,7 +2654,7 @@ Tk_PointToChar(
}
n = Tk_MeasureChars((Tk_Font) fontPtr, chunkPtr->start,
chunkPtr->numBytes, x - chunkPtr->x, 0, &dummy);
- return numChars + Tcl_NumUtfChars(chunkPtr->start, n);
+ return numChars + TkNumUtfChars(chunkPtr->start, n);
}
numChars += chunkPtr->numChars;
lastPtr = chunkPtr;
@@ -2758,7 +2758,7 @@ Tk_CharBbox(
goto check;
}
} else if (index < chunkPtr->numChars) {
- end = Tcl_UtfAtIndex(chunkPtr->start, index);
+ end = TkUtfAtIndex(chunkPtr->start, index);
if (xPtr != NULL) {
Tk_MeasureChars(tkfont, chunkPtr->start,
end - chunkPtr->start, -1, 0, &x);
@@ -3831,7 +3831,7 @@ NewChunk(
*layoutPtrPtr = layoutPtr;
*maxPtr = maxChunks;
}
- numChars = Tcl_NumUtfChars(start, numBytes);
+ numChars = TkNumUtfChars(start, numBytes);
chunkPtr = &layoutPtr->chunks[layoutPtr->numChunks];
chunkPtr->start = start;
chunkPtr->numBytes = numBytes;