diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-19 12:57:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-19 12:57:59 (GMT) |
commit | 2ca3c19fcd3f63c02a731ede1e2a0459f0763b3e (patch) | |
tree | 5db13901c256ec3f40b154b0af58944cef02c52c /win | |
parent | 2caf89a0507e695a539b6c96b465c3610934e729 (diff) | |
parent | e70a9cc2782d595b05f468f17b1fd4a5bc029030 (diff) | |
download | tk-2ca3c19fcd3f63c02a731ede1e2a0459f0763b3e.zip tk-2ca3c19fcd3f63c02a731ede1e2a0459f0763b3e.tar.gz tk-2ca3c19fcd3f63c02a731ede1e2a0459f0763b3e.tar.bz2 |
merge core-8-6-branch
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinDialog.c | 2 | ||||
-rw-r--r-- | win/tkWinFont.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index f9a7cfd..5be6776 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -3487,7 +3487,7 @@ FontchooserShowCmd( LF_FACESIZE-1); Tcl_DStringFree(&ds); lf.lfFaceName[LF_FACESIZE-1] = 0; - lf.lfHeight = -MulDiv(TkFontGetPoints(tkwin, fontPtr->fa.size), + lf.lfHeight = -MulDiv((int)(TkFontGetPoints(tkwin, fontPtr->fa.size) + 0.5), GetDeviceCaps(hdc, LOGPIXELSY), 72); if (fontPtr->fa.weight == TK_FW_BOLD) { lf.lfWeight = FW_BOLD; diff --git a/win/tkWinFont.c b/win/tkWinFont.c index c01dc3f..aa0697c 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -562,7 +562,7 @@ TkpGetFontFromAttributes( ReleaseDC(hwnd, hdc); hFont = GetScreenFont(faPtr, faceName, - TkFontGetPixels(tkwin, faPtr->size), 0.0); + (int)(TkFontGetPixels(tkwin, faPtr->size) + 0.5), 0.0); if (tkFontPtr == NULL) { fontPtr = ckalloc(sizeof(WinFont)); } else { @@ -763,7 +763,7 @@ TkpGetFontAttrsForChar( ReleaseDC(fontPtr->hwnd, hdc); faPtr->family = familyPtr->faceName; faPtr->size = TkFontGetPoints(tkwin, - tm.tmInternalLeading - tm.tmHeight); + (double)(tm.tmInternalLeading - tm.tmHeight)); faPtr->weight = (tm.tmWeight > FW_MEDIUM) ? TK_FW_BOLD : TK_FW_NORMAL; faPtr->slant = tm.tmItalic ? TK_FS_ITALIC : TK_FS_ROMAN; faPtr->underline = (tm.tmUnderlined != 0); @@ -1600,7 +1600,7 @@ InitFont( faPtr->family = Tk_GetUid(Tcl_DStringValue(&faceString)); faPtr->size = - TkFontGetPoints(tkwin, -(fontPtr->pixelSize)); + TkFontGetPoints(tkwin, (double)-(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; |