summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-15 14:56:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-15 14:56:05 (GMT)
commitbb089fa3ae014082fd1642a5c932f8c0c7422924 (patch)
treee917ce2bb4fc8961d0de782ce87d967679bb4de5 /win
parentc257b74035bb102d5860b77c9484c8e7e5ee833c (diff)
downloadtk-bb089fa3ae014082fd1642a5c932f8c0c7422924.zip
tk-bb089fa3ae014082fd1642a5c932f8c0c7422924.tar.gz
tk-bb089fa3ae014082fd1642a5c932f8c0c7422924.tar.bz2
Another attempt to fix [434d294df8b053246ee86e7898d06bc3a6d1d771|434d294df8], this time (hopefully) suitable for 8.6. (less changes than the original attempt)
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinFont.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 635b9a3..62400bb 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 f342f7c..b7b0bec 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 {