summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-19 12:56:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-05-19 12:56:55 (GMT)
commit2ff5fda0fe162179358a1fdd26adefa380b72286 (patch)
tree329065a2785c3d6196bc67333bacb15c8379cce9 /generic/tkFont.h
parent107e2400ee9876bbfd0b4712307f642290498194 (diff)
parent033e66e96af33c0ea2ee90e7a6eb6a63b9424f01 (diff)
downloadtk-2ff5fda0fe162179358a1fdd26adefa380b72286.zip
tk-2ff5fda0fe162179358a1fdd26adefa380b72286.tar.gz
tk-2ff5fda0fe162179358a1fdd26adefa380b72286.tar.bz2
Change internal field TkFontAttributes.size from type integer to double. This causes less roundings overall in various font calculations.
Hopefully this fixes bug [434d294df], still to be confirmed, and makes Tk work again on modern Linux Mint/Fedora systems.
Diffstat (limited to 'generic/tkFont.h')
-rw-r--r--generic/tkFont.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkFont.h b/generic/tkFont.h
index b8de885..de479bf 100644
--- a/generic/tkFont.h
+++ b/generic/tkFont.h
@@ -23,7 +23,7 @@
struct TkFontAttributes {
Tk_Uid family; /* Font family, or NULL to represent plaform-
* specific default system font. */
- int size; /* Pointsize of font, 0 for default size, or
+ double size; /* Pointsize of font, 0.0 for default size, or
* negative number meaning pixel size. */
int weight; /* Weight flag; see below for def'n. */
int slant; /* Slant flag; see below for def'n. */
@@ -198,8 +198,8 @@ MODULE_SCOPE int TkFontParseXLFD(const char *string,
TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr);
MODULE_SCOPE const char *const * TkFontGetAliasList(const char *faceName);
MODULE_SCOPE const char *const *const * TkFontGetFallbacks(void);
-MODULE_SCOPE int TkFontGetPixels(Tk_Window tkwin, int size);
-MODULE_SCOPE int TkFontGetPoints(Tk_Window tkwin, int size);
+MODULE_SCOPE double TkFontGetPixels(Tk_Window tkwin, double size);
+MODULE_SCOPE double TkFontGetPoints(Tk_Window tkwin, double size);
MODULE_SCOPE const char *const * TkFontGetGlobalClass(void);
MODULE_SCOPE const char *const * TkFontGetSymbolClass(void);
MODULE_SCOPE int TkCreateNamedFont(Tcl_Interp *interp, Tk_Window tkwin,