summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-12-30 21:11:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-12-30 21:11:50 (GMT)
commit531e91677e137dc0d6109374daef5cc802bf7c7d (patch)
tree2e09393c84eb48849c1727686eb74216a19113d4
parent0316d840d0dd2798e1e345dd5a565c3c83ccbae3 (diff)
downloadtk-531e91677e137dc0d6109374daef5cc802bf7c7d.zip
tk-531e91677e137dc0d6109374daef5cc802bf7c7d.tar.gz
tk-531e91677e137dc0d6109374daef5cc802bf7c7d.tar.bz2
Restore correct rendering on OSX that was broken by the previous (platform-independent) commit
-rw-r--r--macosx/tkMacOSXFont.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index d3e0e41..78e245a 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -1032,8 +1032,12 @@ TkpDrawCharsInContext(
* whole (not just the range) string when
* drawing. */
{
+ int widthUntilStart;
+
+ TkpMeasureCharsInContext(tkfont, source, numBytes, 0, rangeStart,
+ -1, 0, &widthUntilStart);
DrawCharsInContext(display, drawable, gc, tkfont, source, numBytes,
- rangeStart, rangeLength, x, y, 0.0);
+ rangeStart, rangeLength, x-widthUntilStart, y, 0.0);
}
static void