summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixFont.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-01-07 15:00:40 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-01-07 15:00:40 (GMT)
commit09433140c6105863a449e366525f67083a5295aa (patch)
treed38730537bfb6cd0cab575288492e9ebe13a36e8 /unix/tkUnixFont.c
parent90e21ab406bd1e438de68fcc7790a3534c37ea60 (diff)
parentee8455b769a597dc5d87f89478032b49cf49cdba (diff)
downloadtk-09433140c6105863a449e366525f67083a5295aa.zip
tk-09433140c6105863a449e366525f67083a5295aa.tar.gz
tk-09433140c6105863a449e366525f67083a5295aa.tar.bz2
Fix [3df559ef7c] - Negative bbox width on OS X.
Diffstat (limited to 'unix/tkUnixFont.c')
-rw-r--r--unix/tkUnixFont.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 4a466f1..0c663a3 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -1414,10 +1414,13 @@ TkpDrawCharsInContext(
* whole (not just the range) string when
* drawing. */
{
+ int widthUntilStart;
+
(void) numBytes; /*unused*/
+ Tk_MeasureChars(tkfont, source, rangeStart, -1, 0, &widthUntilStart);
Tk_DrawChars(display, drawable, gc, tkfont, source + rangeStart,
- rangeLength, x, y);
+ rangeLength, x+widthUntilStart, y);
}
/*