summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2007-11-17 21:55:09 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2007-11-17 21:55:09 (GMT)
commitcd3db4fab4487f93d083f8de89bfe41a4556b090 (patch)
tree8678c95896a971835f1a8a045b3d6b583165c56c /win
parent04b391c33f006864aea08854a9426395ffa9f8c7 (diff)
downloadtk-cd3db4fab4487f93d083f8de89bfe41a4556b090.zip
tk-cd3db4fab4487f93d083f8de89bfe41a4556b090.tar.gz
tk-cd3db4fab4487f93d083f8de89bfe41a4556b090.tar.bz2
Minor reshuffle for clarity
Diffstat (limited to 'win')
-rw-r--r--win/tkWinFont.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 671bbcc..aae69a8 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.35 2007/10/30 01:57:58 hobbs Exp $
+ * RCS: @(#) $Id: tkWinFont.c,v 1.36 2007/11/17 21:55:09 patthoyts Exp $
*/
#include "tkWinInt.h"
@@ -1393,11 +1393,14 @@ InitFont(
Tcl_ExternalToUtfDString(systemEncoding, buf, -1, &faceString);
fontPtr->font.fid = (Font) fontPtr;
+ fontPtr->hwnd = hwnd;
+ fontPtr->pixelSize = tm.tmHeight - tm.tmInternalLeading;
faPtr = &fontPtr->font.fa;
faPtr->family = Tk_GetUid(Tcl_DStringValue(&faceString));
+
faPtr->size =
- TkFontGetPoints(tkwin, -(tm.tmHeight - tm.tmInternalLeading));
+ TkFontGetPoints(tkwin, -(fontPtr->pixelSize));
faPtr->weight =
(tm.tmWeight > FW_MEDIUM) ? TK_FW_BOLD : TK_FW_NORMAL;
faPtr->slant = (tm.tmItalic != 0) ? TK_FS_ITALIC : TK_FS_ROMAN;
@@ -1410,9 +1413,6 @@ InitFont(
fmPtr->maxWidth = tm.tmMaxCharWidth;
fmPtr->fixed = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
- fontPtr->hwnd = hwnd;
- fontPtr->pixelSize = tm.tmHeight - tm.tmInternalLeading;
-
fontPtr->numSubFonts = 1;
fontPtr->subFontArray = fontPtr->staticSubFonts;
InitSubFont(hdc, hFont, 1, &fontPtr->subFontArray[0]);