[Pkg-tcltk-commits] r267 - in tk8.3/trunk/debian: . patches
sgolovan-guest at alioth.debian.org
sgolovan-guest at alioth.debian.org
Tue Oct 16 16:38:29 UTC 2007
Author: sgolovan-guest
Date: 2007-10-16 16:38:29 +0000 (Tue, 16 Oct 2007)
New Revision: 267
Modified:
tk8.3/trunk/debian/changelog
tk8.3/trunk/debian/patches/scalable-fonts.diff
Log:
[tk8.3]
* Fixed segfault in case if only scalable fonts are available and the best
scored font is infeasible.
Modified: tk8.3/trunk/debian/changelog
===================================================================
--- tk8.3/trunk/debian/changelog 2007-10-16 16:33:35 UTC (rev 266)
+++ tk8.3/trunk/debian/changelog 2007-10-16 16:38:29 UTC (rev 267)
@@ -8,6 +8,8 @@
debian/control to prepare binary packages for default tk and tk-dev.
* Added Homepage field to debian/control.
* Added compat headers to tk-private directory.
+ * Fixed segfault in case if only scalable fonts are available and the best
+ scored font is infeasible.
-- Sergei Golovan <sgolovan at debian.org> Sun, 14 Oct 2007 01:10:37 +0400
Modified: tk8.3/trunk/debian/patches/scalable-fonts.diff
===================================================================
--- tk8.3/trunk/debian/patches/scalable-fonts.diff 2007-10-16 16:33:35 UTC (rev 266)
+++ tk8.3/trunk/debian/patches/scalable-fonts.diff 2007-10-16 16:38:29 UTC (rev 267)
@@ -5,6 +5,10 @@
See details in bugs #156119, #156115 and at
http://sourceforge.net/tracker/index.php?func=detail&aid=1544491&group_id=12997&atid=112997
+Also, added a fix by Sergei Golovan, which provides workaround for the case
+when no non-scalable fonts are returned and chosen fixed font is infeasible
+(this case was never triggered without tkFont.c patch).
+
Index: tk8.3-8.3.5/generic/tkFont.c
===================================================================
--- tk8.3-8.3.5.orig/generic/tkFont.c
@@ -27,3 +31,17 @@
if (FieldSpecified(field[XLFD_CHARSET])) {
xaPtr->charset = Tk_GetUid(field[XLFD_CHARSET]);
} else {
+Index: tk8.3/unix/tkUnixFont.c
+===================================================================
+--- tk8.3.orig/unix/tkUnixFont.c
++++ tk8.3/unix/tkUnixFont.c
+@@ -2660,6 +2660,9 @@
+ bestScore[1] = INT_MAX;
+ }
+ if (fontStructPtr == NULL) {
++ if (bestIdx[0] < 0) {
++ return GetSystemFont(display);
++ }
+ fontStructPtr = XLoadQueryFont(display, nameList[bestIdx[0]]);
+ if (fontStructPtr == NULL) {
+ /*
More information about the Pkg-tcltk-commits
mailing list