public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xfig] epel10.2: Fix font issues (rhbz#1523624) :
@ 2026-05-30 14:28 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2026-05-30 14:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/xfig
            Branch : epel10.2
            Commit : 8b02b070fc35bffcebbb811519d2784e37010963
            Author : Hans de Goede <hdegoede@redhat.com>
            Date   : 2018-03-01T23:46:57+01:00
            Stats  : +201/-56 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/xfig/c/8b02b070fc35bffcebbb811519d2784e37010963?branch=epel10.2

            Log:
            Fix font issues (rhbz#1523624) :
 Adjust xfig-3.2.5-urwfonts.patch for new font names in urw-base35-fonts
 Except for the symbols font, use the old un-scalable Adobe PCF Symbol font
   for now as StandardSymbolsPS.otf from urw-base35-fonts is currently broken
 Add a patch to deal with some fonts being scalable, while Symbol is not
 Note the dingbats font is also broken in urw-base35-fonts, but there is no
   replacement for it, so that font is still broken, see rhbz#1534206
ghostscript-core no longer exists, instead require ghostscript (rhbz#1536581)
Remove obsolete icon-cache and desktop-database scriptlets
Add a patch from Debian fixing some issues with arrows

---
diff --git a/07_colorsliderarrows.patch b/07_colorsliderarrows.patch
new file mode 100644
index 0000000..0bb141b
--- /dev/null
+++ b/07_colorsliderarrows.patch
@@ -0,0 +1,34 @@
+Description: Fix direction of RGB & HSV color sliders arrows.
+Author: Tim Bagot <tsb-debian-bts@earth.li>
+Bug-Debian: https://bugs.debian.org/870365
+
+--- a/src/w_color.c
++++ b/src/w_color.c
+@@ -1919,15 +1919,15 @@ Scrolled(Widget w, XtPointer closure, Xt
+ 			pos = 255 - (int)(locked_top * 255 + 0.5);
+ 			break;
+ 		case S_HUE:
+-			hsv_values.h += (going_up? -blip: blip);
++			hsv_values.h += (going_up? blip: -blip);
+ 			ThumbHSV(w, 1.0-hsv_values.h);
+ 			return;
+ 		case S_SAT:
+-			hsv_values.s += (going_up? -blip: blip);
++			hsv_values.s += (going_up? blip: -blip);
+ 			ThumbHSV(w, 1.0-hsv_values.s);
+ 			return;
+ 		case S_VAL:
+-			hsv_values.v += (going_up? -blip: blip);
++			hsv_values.v += (going_up? blip: -blip);
+ 			ThumbHSV(w, 1.0-hsv_values.v);
+ 			return;
+ 		default:
+@@ -1935,7 +1935,7 @@ Scrolled(Widget w, XtPointer closure, Xt
+ 			exit(1);
+ 	}
+ 
+-	if (going_up) {
++	if (!going_up) {
+ 		if (pos > 0)
+ 			pos--;
+ 	} else {

diff --git a/xfig-3.2.5-urwfonts.patch b/xfig-3.2.5-urwfonts.patch
index 82ca561..69938ce 100644
--- a/xfig-3.2.5-urwfonts.patch
+++ b/xfig-3.2.5-urwfonts.patch
@@ -1,6 +1,6 @@
 --- xfig.3.2.4/src/u_fonts.c	2002-09-09 13:36:58.000000000 -0400
 +++ xfig-3.2.4/src/u_fonts.c	2006-10-11 00:29:07.000000000 -0400
-@@ -22,41 +22,41 @@
+@@ -22,41 +22,44 @@
  /* X11 font names */
  
  struct _xfstruct x_fontinfo[NUM_FONTS] = {
@@ -39,41 +39,44 @@
 -    {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
 -    {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL},
 -    {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL},
-+    {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL},
-+    {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL},
-+    {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL},
-+    {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l condensed-medium-r-condensed--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l condensed-medium-i-condensed--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l condensed-bold-r-condensed--", (struct xfont*) NULL},
-+    {"-urw-nimbus sans l condensed-bold-i-condensed--", (struct xfont*) NULL},
-+    {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL},
-+    {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL},
-+    {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL},
-+    {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL},
-+    {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus roman-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus roman-medium-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus roman-bold-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus roman-bold-i-normal--", (struct xfont*) NULL},
++    {"-urw-urw gothic-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-urw gothic-medium-o-normal--", (struct xfont*) NULL},
++    {"-urw-urw gothic-semibold-r-normal--", (struct xfont*) NULL},
++    {"-urw-urw gothic-semibold-o-normal--", (struct xfont*) NULL},
++    {"-urw-urw bookman-light-r-normal--", (struct xfont*) NULL},
++    {"-urw-urw bookman-light-i-normal--", (struct xfont*) NULL},
++    {"-urw-urw bookman-semibold-r-normal--", (struct xfont*) NULL},
++    {"-urw-urw bookman-semibold-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus mono ps-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus mono ps-medium-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus mono ps-bold-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus mono ps-bold-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus sans-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus sans-medium-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus sans-bold-r-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus sans-bold-i-normal--", (struct xfont*) NULL},
++    {"-urw-nimbus sans narrow-medium-r-semicondensed--", (struct xfont*) NULL},
++    {"-urw-nimbus sans narrow-medium-o-semicondensed--", (struct xfont*) NULL},
++    {"-urw-nimbus sans narrow-bold-r-semicondensed--", (struct xfont*) NULL},
++    {"-urw-nimbus sans narrow-bold-o-semicondensed--", (struct xfont*) NULL},
++    {"-urw-c059-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-c059-medium-i-normal--", (struct xfont*) NULL},
++    {"-urw-c059-bold-r-normal--", (struct xfont*) NULL},
++    {"-urw-c059-bold-i-normal--", (struct xfont*) NULL},
++    {"-urw-p052-medium-r-normal--", (struct xfont*) NULL},
++    {"-urw-p052-medium-i-normal--", (struct xfont*) NULL},
++    {"-urw-p052-bold-r-normal--", (struct xfont*) NULL},
++    {"-urw-p052-bold-i-normal--", (struct xfont*) NULL},
++    /* Should be "-urw-standard symbols ps-medium-r-normal--" but that is currently broken */
++    {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
++    /* Should be "-urw-z003-medium-i-normal--" but that is currently broken */
++    {"-urw-nimbus roman-bold-i-normal--", (struct xfont*) NULL},
++    /* Also broken but we've no alternative for it */
++    {"-urw-d050000l-medium-r-normal--", (struct xfont*) NULL},
  };
  
  /* Use the following font names for any font that doesn't exist in the table above.

diff --git a/xfig-3.2.6a-scalable-fonts.patch b/xfig-3.2.6a-scalable-fonts.patch
new file mode 100644
index 0000000..f9b1ed0
--- /dev/null
+++ b/xfig-3.2.6a-scalable-fonts.patch
@@ -0,0 +1,106 @@
+diff -up xfig-3.2.6a/src/w_drawprim.c.scalable xfig-3.2.6a/src/w_drawprim.c
+--- xfig-3.2.6a/src/w_drawprim.c.scalable	2017-01-05 15:08:08.000000000 +0100
++++ xfig-3.2.6a/src/w_drawprim.c	2018-03-01 18:01:52.344780986 +0100
+@@ -69,6 +69,7 @@ static Pixel	gc_color[NUMOPS], gc_backgr
+ static XRectangle clip[1];
+ static int	parsesize(char *name);
+ static Boolean	openwinfonts;
++static Boolean  font_scalable[NUM_FONTS];
+ 
+ #define MAXNAMES 300
+ 
+@@ -131,33 +132,42 @@ void init_font(void)
+     if (appres.scalablefonts) {
+ 	/* first look for OpenWindow style font names (e.g. times-roman) */
+ 	if ((fontlist = XListFonts(tool_d, ps_fontinfo[1].name, 1, &count))!=0) {
+-		openwinfonts = True;	/* yes, use them */
+-		for (f=0; f<NUM_FONTS; f++)	/* copy the OpenWindow font names */
+-		    x_fontinfo[f].template = ps_fontinfo[f+1].name;
++            openwinfonts = True; /* yes, use them */
++            for (f=0; f<NUM_FONTS; f++) { /* copy the OpenWindow font names */
++                x_fontinfo[f].template = ps_fontinfo[f+1].name;
++                font_scalable[f] = True;
++            }
++            XFreeFontNames(fontlist);
+ 	} else {
+-	    strcpy(template,x_fontinfo[0].template);  /* nope, check for font size 0 */
+-	    strcat(template,"0-0-*-*-*-*-");
+-	    /* add ISO8859 (if not Symbol font or ZapfDingbats) to font name in non-international mode*/
+-	    if (
++            for (f = 0; f < NUM_FONTS; f++) {
++                strcpy(template,x_fontinfo[f].template);  /* nope, check for font size 0 */
++                strcat(template,"0-0-*-*-*-*-");
++                /* add ISO8859 (if not Symbol font or ZapfDingbats) to font name in non-international mode*/
++                if (
+ #ifdef I18N
+-		!appres.international &&
++                    !appres.international &&
+ #endif
+-		strstr(template,"ymbol") == NULL &&
+-		strstr(template,"ingbats") == NULL)
+-		    strcat(template,"ISO8859-*");
+-	    else
+-		strcat(template,"*-*");
+-	    if ((fontlist = XListFonts(tool_d, template, 1, &count))==0)
+-		appres.scalablefonts = False;   /* none, turn off request for them */
++                    strstr(template,"ymbol") == NULL &&
++                    strstr(template,"ingbats") == NULL)
++                        strcat(template,"ISO8859-*");
++                else
++                    strcat(template,"*-*");
++
++                if ((fontlist = XListFonts(tool_d, template, 1, &count)))
++                    font_scalable[f] = True;
++                else
++                    font_scalable[f] = False;
++
++                XFreeFontNames(fontlist);
++            }
+ 	}
+-	XFreeFontNames(fontlist);
+     }
+ 
+     /* no scalable fonts - query the server for all the font
+        names and sizes and build a list of them */
+ 
+-    if (!appres.scalablefonts) {
+-	for (f = 0; f < NUM_FONTS; f++) {
++    for (f = 0; f < NUM_FONTS; f++) {
++        if (!font_scalable[f]) {
+ 	    nf = NULL;
+ 	    strcpy(template,x_fontinfo[f].template);
+ 	    strcat(template,"*-*-*-*-*-*-");
+@@ -210,8 +220,8 @@ void init_font(void)
+ 			nf->next = NULL;
+ 		    }
+ 	    } /* next size */
+-	} /* next font, f */
+-    } /* !appres.scalablefonts */
++        } /* !font_scalable[f] */
++    } /* next font, f */
+ }
+ 
+ /* parse the point size of font 'name' */
+@@ -279,11 +289,11 @@ lookfont(int fnum, int size)
+ 	nf = x_fontinfo[fnum].xfontlist;
+ 	oldnf = nf;
+ 	if (nf != NULL) {
+-	    if (nf->size > size && !appres.scalablefonts)
++	    if (nf->size > size && !font_scalable[fnum])
+ 		found = True;
+ 	    else {
+ 		while (nf != NULL) {
+-		    if (nf->size == size || (!appres.scalablefonts &&
++		    if (nf->size == size || (!font_scalable[fnum] &&
+ 			   (nf->size >= size && oldnf->size <= size))) {
+ 			found = True;
+ 			break;
+@@ -297,7 +307,7 @@ lookfont(int fnum, int size)
+ 	    strcpy(fn,nf->fname);  /* put the name in fn */
+ 	    if (size < nf->size)
+ 		put_msg("Font size %d not found, using larger %d point",size,nf->size);
+-	} else if (!appres.scalablefonts) {	/* not found, use largest available */
++	} else if (!font_scalable[fnum]) {	/* not found, use largest available */
+ 	    nf = oldnf;
+ 	    strcpy(fn,nf->fname);		/* put the name in fn */
+ 	    if (size > nf->size)

diff --git a/xfig.spec b/xfig.spec
index 8efbdc5..b46a937 100644
--- a/xfig.spec
+++ b/xfig.spec
@@ -3,7 +3,7 @@
 Summary: An X Window System tool for drawing basic vector graphics
 Name: xfig
 Version: 3.2.6a
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: MIT
 URL:     https://en.wikipedia.org/wiki/Xfig
 Source0: http://downloads.sourceforge.net/mcj/xfig-%{version}.tar.xz
@@ -13,6 +13,8 @@ Source3: xfig.appdata.xml
 
 Patch0: xfig-3.2.5a-default-apps.patch
 Patch1: xfig-3.2.5-urwfonts.patch
+Patch2: xfig-3.2.6a-scalable-fonts.patch
+Patch3: 07_colorsliderarrows.patch
 
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
@@ -29,7 +31,12 @@ BuildRequires: Xaw3d-devel
 BuildRequires: man2html-core ImageMagick
 BuildRequires: desktop-file-utils libappstream-glib
 # For eps preview generation
-Requires: ghostscript-core
+Requires: ghostscript
+# For scalable fonts, also see xfig-3.2.5-urwfonts.patch
+Requires: urw-base35-fonts
+# Because StandardSymbolsPS.otf from urw-base35-fonts is currently broken,
+# should be dropped and xfig-3.2.5-urwfonts.patch adjusted, once fixed
+Requires: xorg-x11-fonts-100dpi
 
 # We used to have seperate Xaw3d and non Xaw3d pkgs, now we only have Xaw3d
 Obsoletes: %{name}-common < %{version}-%{release}
@@ -51,9 +58,7 @@ graphics.
 
 
 %prep
-%setup -q -a 1
-%patch0 -p1
-%patch1 -p1
+%autosetup -p1 -a 1
 for i in doc/html/japanese/button_frame.fig doc/html/japanese/japanese.ps \
          doc/html/animate.js; do
   sed -i.orig 's/\r//' $i; touch -r $i.orig $i; rm $i.orig
@@ -88,21 +93,6 @@ appstream-util validate-relax --nonet \
   $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
 
 
-%post
-update-desktop-database &> /dev/null || :
-touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
-%postun
-update-desktop-database &> /dev/null || :
-if [ $1 -eq 0 ] ; then
-    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
-    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-
-%posttrans
-gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-
-
 %files
 %doc %{_docdir}/%{name}
 %{_bindir}/%{name}
@@ -115,6 +105,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Thu Mar 01 2018 Hans de Goede <hdegoede@redhat.com> - 3.2.6a-6
+- Fix font issues (rhbz#1523624) :
+ - Adjust xfig-3.2.5-urwfonts.patch for new font names in urw-base35-fonts
+ - Except for the symbols font, use the old un-scalable Adobe PCF Symbol font
+   for now as StandardSymbolsPS.otf from urw-base35-fonts is currently broken
+ - Add a patch to deal with some fonts being scalable, while Symbol is not
+ - Note the dingbats font is also broken in urw-base35-fonts, but there is no
+   replacement for it, so that font is still broken, see rhbz#1534206
+- ghostscript-core no longer exists, instead require ghostscript (rhbz#1536581)
+- Remove obsolete icon-cache and desktop-database scriptlets
+- Add a patch from Debian fixing some issues with arrows
+
 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.6a-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-30 14:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-30 14:28 [rpms/xfig] epel10.2: Fix font issues (rhbz#1523624) : Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox