diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-17 21:55:09 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-17 21:55:09 (GMT) |
commit | cd3db4fab4487f93d083f8de89bfe41a4556b090 (patch) | |
tree | 8678c95896a971835f1a8a045b3d6b583165c56c | |
parent | 04b391c33f006864aea08854a9426395ffa9f8c7 (diff) | |
download | tk-cd3db4fab4487f93d083f8de89bfe41a4556b090.zip tk-cd3db4fab4487f93d083f8de89bfe41a4556b090.tar.gz tk-cd3db4fab4487f93d083f8de89bfe41a4556b090.tar.bz2 |
Minor reshuffle for clarity
-rw-r--r-- | win/tkWinFont.c | 10 |
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]); |