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)
commit829515686e1ec186db18ae14ad36b66bd4f34f55 (patch)
treec7e63809c08b57af95251b0d4833fdcd1664a52b /unix
parentda7c7c948aac91da34dff2a91c3268fe497f1549 (diff)
parent04bfe2b1632c5b7636ae56a6b5d6b82e23420fc1 (diff)
downloadtk-829515686e1ec186db18ae14ad36b66bd4f34f55.zip
tk-829515686e1ec186db18ae14ad36b66bd4f34f55.tar.gz
tk-829515686e1ec186db18ae14ad36b66bd4f34f55.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);
}
/*