summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-01-07 15:01:22 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-01-07 15:01:22 (GMT)
commit3ccac6ac9f0becb6bb86517420e1c2c5f2dae06e (patch)
treec7e63809c08b57af95251b0d4833fdcd1664a52b /unix
parent297d6b201c940ded0bf08c3e6302275f6e933241 (diff)
parent09433140c6105863a449e366525f67083a5295aa (diff)
downloadtk-3ccac6ac9f0becb6bb86517420e1c2c5f2dae06e.zip
tk-3ccac6ac9f0becb6bb86517420e1c2c5f2dae06e.tar.gz
tk-3ccac6ac9f0becb6bb86517420e1c2c5f2dae06e.tar.bz2
Fix [3df559ef7c] - Negative bbox width on OS X.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixFont.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index c96e562..e5aceb1 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);
}
/*