diff options
author | fvogel <fvogelnew1@free.fr> | 2024-05-16 20:39:56 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-05-16 20:39:56 (GMT) |
commit | 9d8fd009e8a34652cb49be13d2dc96dda78bd4d5 (patch) | |
tree | a1c8ef2c88e5a9c2f19e0594452e97d9d7fcf6f0 /unix | |
parent | dc7e102c0d1dbe5be1229da812fec34eaeb1c7bf (diff) | |
download | tk-9d8fd009e8a34652cb49be13d2dc96dda78bd4d5.zip tk-9d8fd009e8a34652cb49be13d2dc96dda78bd4d5.tar.gz tk-9d8fd009e8a34652cb49be13d2dc96dda78bd4d5.tar.bz2 |
The XFT_PIXEL_SIZE property is a double in fontconfig. See also [434d294df8].
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixRFont.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index baf9071..f3ab5c9 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -184,8 +184,8 @@ GetTkFontAttributes( { const char *family = "Unknown"; const char *const *familyPtr = &family; - int weight, slant, pxsize; - double size, ptsize; + int weight, slant; + double size, ptsize, pxsize; (void) XftPatternGetString(ftFont->pattern, XFT_FAMILY, 0, familyPtr); if (XftPatternGetDouble(ftFont->pattern, XFT_PIXEL_SIZE, 0, @@ -194,9 +194,9 @@ GetTkFontAttributes( } else if (XftPatternGetDouble(ftFont->pattern, XFT_SIZE, 0, &ptsize) == XftResultMatch) { size = ptsize; - } else if (XftPatternGetInteger(ftFont->pattern, XFT_PIXEL_SIZE, 0, + } else if (XftPatternGetDouble(ftFont->pattern, XFT_PIXEL_SIZE, 0, &pxsize) == XftResultMatch) { - size = (double)-pxsize; + size = -pxsize; } else { size = 12.0; } |