summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixFont.c
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)
commit002b62783852b8976a99c3c335c02a9e7b2620b5 (patch)
treee917ce2bb4fc8961d0de782ce87d967679bb4de5 /unix/tkUnixFont.c
parent8b59cb5249fe45bac39e65cb724d77b434168d9f (diff)
downloadtk-002b62783852b8976a99c3c335c02a9e7b2620b5.zip
tk-002b62783852b8976a99c3c335c02a9e7b2620b5.tar.gz
tk-002b62783852b8976a99c3c335c02a9e7b2620b5.tar.bz2
Another attempt to fix [434d294df8b053246ee86e7898d06bc3a6d1d771|434d294df8], this time (hopefully) suitable for 8.6. (less changes than the original attempt)
Diffstat (limited to 'unix/tkUnixFont.c')
-rw-r--r--unix/tkUnixFont.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 0c663a3..a447ec7 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -1642,7 +1642,7 @@ InitFont(
fmPtr->fixed = fixed;
fontPtr->display = display;
- fontPtr->pixelSize = TkFontGetPixels(tkwin, fa.fa.size);
+ fontPtr->pixelSize = (int)(TkFontGetPixels(tkwin, fa.fa.size) + 0.5);
fontPtr->xa = fa.xa;
fontPtr->numSubFonts = 1;
@@ -2773,7 +2773,7 @@ GetScreenFont(
}
*str = '\0';
sprintf(buf, "%.200s-%d-*-*-*-*-*%s", nameList[bestIdx[1]],
- -wantPtr->fa.size, rest);
+ (int)(-wantPtr->fa.size-0.5), rest);
*str = '-';
fontStructPtr = XLoadQueryFont(display, buf);
bestScore[1] = INT_MAX;