[Pkg-tcltk-commits] r266 - in tk8.4/trunk/debian: . patches

sgolovan-guest at alioth.debian.org sgolovan-guest at alioth.debian.org
Tue Oct 16 16:33:35 UTC 2007


Author: sgolovan-guest
Date: 2007-10-16 16:33:35 +0000 (Tue, 16 Oct 2007)
New Revision: 266

Modified:
   tk8.4/trunk/debian/changelog
   tk8.4/trunk/debian/patches/scalable-fonts.diff
Log:
[tk8.4]
  * Fixed segfault in case if only scalable fonts are available and the best
    scored font is infeasible (closes: #444546).


Modified: tk8.4/trunk/debian/changelog
===================================================================
--- tk8.4/trunk/debian/changelog	2007-10-15 10:36:13 UTC (rev 265)
+++ tk8.4/trunk/debian/changelog	2007-10-16 16:33:35 UTC (rev 266)
@@ -8,8 +8,10 @@
   * Removed conflicts with tcl and providing tcl-dev packages from
     debian/control to prepare binary packages for default tcl and tcl-dev.
   * Added Homepage field to debian/control.
+  * Fixed segfault in case if only scalable fonts are available and the best
+    scored font is infeasible (closes: #444546).
 
- -- Sergei Golovan <sgolovan at debian.org>  Sun, 14 Oct 2007 20:32:13 +0400
+ -- Sergei Golovan <sgolovan at debian.org>  Tue, 16 Oct 2007 20:32:58 +0400
 
 tk8.4 (8.4.16-1) unstable; urgency=low
 

Modified: tk8.4/trunk/debian/patches/scalable-fonts.diff
===================================================================
--- tk8.4/trunk/debian/patches/scalable-fonts.diff	2007-10-15 10:36:13 UTC (rev 265)
+++ tk8.4/trunk/debian/patches/scalable-fonts.diff	2007-10-16 16:33:35 UTC (rev 266)
@@ -5,10 +5,14 @@
 See details in bugs #156119, #156115 and at
 http://sourceforge.net/tracker/index.php?func=detail&aid=1544491&group_id=12997&atid=112997
 
-Index: tk8.3-8.3.5/generic/tkFont.c
+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.4/generic/tkFont.c
 ===================================================================
---- tk8.3-8.3.5.orig/generic/tkFont.c
-+++ tk8.3-8.3.5/generic/tkFont.c
+--- tk8.4.orig/generic/tkFont.c
++++ tk8.4/generic/tkFont.c
 @@ -3395,8 +3395,15 @@
  
      /* XLFD_SPACING ignored. */
@@ -27,3 +31,17 @@
      if (FieldSpecified(field[XLFD_CHARSET])) {
  	xaPtr->charset = Tk_GetUid(field[XLFD_CHARSET]);
      } else {
+Index: tk8.4/unix/tkUnixFont.c
+===================================================================
+--- tk8.4.orig/unix/tkUnixFont.c
++++ tk8.4/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