summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-05-23 14:58:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-05-23 14:58:41 (GMT)
commit73b7effc31ec76c6f682fa75ab4bcac6b50e6955 (patch)
tree1c61ff85f43477826b2500c1f7533f3cffcdf137 /win
parent56f4a0d0fc8d1566198a423a888e16aa5336c08e (diff)
parentce84448c05bb61135f0cebd1a812f3e4496f62bd (diff)
downloadtk-73b7effc31ec76c6f682fa75ab4bcac6b50e6955.zip
tk-73b7effc31ec76c6f682fa75ab4bcac6b50e6955.tar.gz
tk-73b7effc31ec76c6f682fa75ab4bcac6b50e6955.tar.bz2
merge 8.6
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c4
-rw-r--r--win/tkWinFont.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 635b9a3..5be6776 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -2808,7 +2808,7 @@ Tk_MessageBoxObjCmd(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_DString titleBuf, tmpBuf;
- WCHAR *titlePtr, *tmpPtr;
+ const WCHAR *titlePtr, *tmpPtr;
const char *src;
defaultBtn = -1;
@@ -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..d67ea66 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;