From 6ce7b43167de73e24aa362356d24fe513a18bd50 Mon Sep 17 00:00:00 2001 From: wordtech Date: Thu, 6 Jan 2011 00:04:44 +0000 Subject: Fix for 2857300, improves rounding up on text width [submitted by treectrl] --- macosx/tkMacOSXFont.c | 4 ++-- 1 file 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 -- cgit v0.12