aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/tcltk/tk-8.5.8/fontsize.diff
blob: a3df0bc29a71c07de8d26290ab6a4363be1fdeea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Patch by Sergei Golovan fixes mirroring font in canvas postscript when its
size is specified in pixels (negative).

--- tk8.5-8.5.4.orig/unix/tkUnixRFont.c
+++ tk8.5-8.5.4/unix/tkUnixRFont.c
@@ -260,6 +260,7 @@
     ftFont = GetFont(fontPtr, 0);
     fontPtr->font.fid = XLoadFont(Tk_Display(tkwin), "fixed");
     GetTkFontAttributes(ftFont, &fontPtr->font.fa);
+    fontPtr->font.fa.size = TkFontGetPoints(tkwin, fontPtr->font.fa.size);
     GetTkFontMetrics(ftFont, &fontPtr->font.fm);
 
     return fontPtr;
@@ -517,6 +518,7 @@
 				/* Actual font used to render the character */
 
     GetTkFontAttributes(ftFont, faPtr);
+    faPtr->size = TkFontGetPoints(tkwin, faPtr->size);
     faPtr->underline = fontPtr->font.fa.underline;
     faPtr->overstrike = fontPtr->font.fa.overstrike;
 }