diff options
author | patthoyts <patthoyts@noemail.net> | 2007-11-17 21:55:08 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2007-11-17 21:55:08 (GMT) |
commit | 0020f03939052398207f5f12835d34ff47087def (patch) | |
tree | 8678c95896a971835f1a8a045b3d6b583165c56c /win/tkWinFont.c | |
parent | fe6aaa984b3a047f3c1e9024645f8e8e7db5ec91 (diff) | |
download | tk-0020f03939052398207f5f12835d34ff47087def.zip tk-0020f03939052398207f5f12835d34ff47087def.tar.gz tk-0020f03939052398207f5f12835d34ff47087def.tar.bz2 |
Minor reshuffle for clarity
FossilOrigin-Name: de564ca78d6d1e8bc388d62dd0ec425ad05483cb
Diffstat (limited to 'win/tkWinFont.c')
-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]); |