diff options
author | wordtech <wordtech> | 2011-01-06 00:04:44 (GMT) |
---|---|---|
committer | wordtech <wordtech> | 2011-01-06 00:04:44 (GMT) |
commit | 6ce7b43167de73e24aa362356d24fe513a18bd50 (patch) | |
tree | 4f89044c3c86c6daa4bbe75fca7189c264b077a4 /macosx/tkMacOSXFont.c | |
parent | 3c2ab580d7e8c701b9017fd96f5ca13b7f4276a2 (diff) | |
download | tk-6ce7b43167de73e24aa362356d24fe513a18bd50.zip tk-6ce7b43167de73e24aa362356d24fe513a18bd50.tar.gz tk-6ce7b43167de73e24aa362356d24fe513a18bd50.tar.bz2 |
Fix for 2857300, improves rounding up on text width [submitted by treectrl]
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r-- | macosx/tkMacOSXFont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 270b9bf..7548ace 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.47 2010/12/02 11:38:29 dkf Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.48 2011/01/06 00:04:44 wordtech Exp $ */ #include "tkMacOSXPrivate.h" @@ -884,7 +884,7 @@ TkpMeasureCharsInContext( CFRelease(typesetter); [attributedString release]; [string release]; - length = lround(width - offset); + length = ceil(width - offset); fit = (Tcl_UtfAtIndex(source, index) - source) - rangeStart; done: #ifdef TK_MAC_DEBUG_FONTS |