diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-05 08:49:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-05 08:49:47 (GMT) |
commit | aacf8d739e27f7131d0a7322da993ba8158df5e6 (patch) | |
tree | b53ca9c943b91ed43676acd0f73612577ebae655 /win | |
parent | a580567464cda1d5a6116339acc707e451e7854e (diff) | |
download | tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.zip tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.tar.gz tk-aacf8d739e27f7131d0a7322da993ba8158df5e6.tar.bz2 |
Corrected rounding of coordinates when working with fonts. [Bug 2824916]
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinFont.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 79df98c..715228b 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.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: tkWinFont.c,v 1.47 2009/10/29 09:44:55 patthoyts Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.48 2010/01/05 08:49:50 dkf Exp $ */ #include "tkWinInt.h" @@ -2500,8 +2500,8 @@ GetScreenFont( memset(&lf, 0, sizeof(lf)); lf.lfHeight = -pixelSize; lf.lfWidth = 0; - lf.lfEscapement = (int) floor(angle * 10 + 0.5); - lf.lfOrientation = (int) floor(angle * 10 + 0.5); + lf.lfEscapement = ROUND16(angle * 10); + lf.lfOrientation = ROUND16(angle * 10); lf.lfWeight = (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD; lf.lfItalic = faPtr->slant; lf.lfUnderline = faPtr->underline; |