public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/xfig] epel10.2: Fix font issues take 2 (rhbz#1523624) :
Date: Sat, 30 May 2026 14:28:30 GMT [thread overview]
Message-ID: <178015131018.1.11621362279263308572.rpms-xfig-d327e0e90451@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/xfig
Branch : epel10.2
Commit : d327e0e90451476249b991ecfdf219975473dfbe
Author : Hans de Goede <hdegoede@redhat.com>
Date : 2018-03-03T16:09:19+01:00
Stats : +91/-7 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/xfig/c/d327e0e90451476249b991ecfdf219975473dfbe?branch=epel10.2
Log:
Fix font issues take 2 (rhbz#1523624) :
It turns out the new urw fonts are completely unusuable as X11 core fonts,
stop using them for now (see bug rhbz#1551219)
Add a patch to use the fallback fonts for non-scalable fonts too, so that
we at least show something somewhat reasonable for Bookman, New Century
Schoolbook and Palatino
This means that display of Zapf Chancery and Zapf Dingbats currently
falls back to the "fixed" font, which is completely wrong for Dingbats
---
diff --git a/xfig-3.2.6a-fallback-for-nonscalable-fonts.patch b/xfig-3.2.6a-fallback-for-nonscalable-fonts.patch
new file mode 100644
index 0000000..36644e3
--- /dev/null
+++ b/xfig-3.2.6a-fallback-for-nonscalable-fonts.patch
@@ -0,0 +1,71 @@
+diff -up xfig-3.2.6a/src/w_drawprim.c.orig xfig-3.2.6a/src/w_drawprim.c
+--- xfig-3.2.6a/src/w_drawprim.c.orig 2018-03-03 14:16:49.102597205 +0100
++++ xfig-3.2.6a/src/w_drawprim.c 2018-03-03 14:31:36.434162815 +0100
+@@ -90,6 +90,7 @@ void init_font(void)
+ struct xfont *newfont, *nf;
+ int f, count, i, p, ss;
+ char template[300];
++ char backup_template[300];
+ char **fontlist, **fname;
+
+ if (appres.boldFont == NULL || *appres.boldFont == '\0')
+@@ -171,19 +172,28 @@ void init_font(void)
+ nf = NULL;
+ strcpy(template,x_fontinfo[f].template);
+ strcat(template,"*-*-*-*-*-*-");
++ strcpy(backup_template,x_backup_fontinfo[f].template);
++ strcat(backup_template,"*-*-*-*-*-*-");
+ /* add ISO8859 (if not Symbol font or ZapfDingbats) to font name in non-international mode*/
+ if (
+ #ifdef I18N
+ !appres.international &&
+ #endif
+ strstr(template,"ymbol") == NULL &&
+- strstr(template,"ingbats") == NULL)
++ strstr(template,"ingbats") == NULL) {
+ strcat(template,"ISO8859-*");
+- else
++ strcat(backup_template,"ISO8859-*");
++ } else {
+ strcat(template,"*-*");
++ strcat(backup_template,"*-*");
++ }
+ /* don't free the Fontlist because we keep pointers into it */
+ p = 0;
+- if ((fontlist = XListFonts(tool_d, template, MAXNAMES, &count))==0) {
++
++ if ((fontlist = XListFonts(tool_d, template, MAXNAMES, &count))==0)
++ fontlist = XListFonts(tool_d, backup_template, MAXNAMES, &count);
++
++ if (fontlist == 0) {
+ /* no fonts by that name found, substitute the -normal font name */
+ flist[p].fn = appres.normalFont;
+ flist[p++].s = 12; /* just set the size to 12 */
+@@ -233,16 +243,17 @@ parsesize(char *name)
+ int s;
+ char *np;
+
+- for (np = name; *(np + 1); np++)
+- if (*np == '-' && *(np + 1) == '-') /* look for the -- */
+- break;
+- s = 0;
+- if (*(np + 1)) {
+- np += 2; /* point past the -- */
+- s = atoi(np); /* get the point size */
+- } else
+- fprintf(stderr, "Can't parse '%s'\n", name);
+- return s;
++ for (np = name; *(np + 1); np++) {
++ /* look for "--" */
++ if (strncmp(np, "--", 2) == 0)
++ return atoi(np + 2);
++ /* For "-b&h-lucida-*-normal-sans-<point-size>-*" */
++ if (strncmp(np, "-normal-sans-", 13) == 0)
++ return atoi(np + 13);
++ }
++
++ fprintf(stderr, "Can't parse '%s'\n", name);
++ return 0;
+ }
+
+ /*
diff --git a/xfig.spec b/xfig.spec
index b46a937..c00e671 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: 6%{?dist}
+Release: 7%{?dist}
License: MIT
URL: https://en.wikipedia.org/wiki/Xfig
Source0: http://downloads.sourceforge.net/mcj/xfig-%{version}.tar.xz
@@ -12,9 +12,10 @@ Source2: xfig.desktop
Source3: xfig.appdata.xml
Patch0: xfig-3.2.5a-default-apps.patch
-Patch1: xfig-3.2.5-urwfonts.patch
+#Patch1: xfig-3.2.5-urwfonts.patch
Patch2: xfig-3.2.6a-scalable-fonts.patch
-Patch3: 07_colorsliderarrows.patch
+Patch3: xfig-3.2.6a-fallback-for-nonscalable-fonts.patch
+Patch4: 07_colorsliderarrows.patch
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@@ -32,10 +33,12 @@ BuildRequires: man2html-core ImageMagick
BuildRequires: desktop-file-utils libappstream-glib
# For eps preview generation
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
+# Used in the UI
+Requires: xorg-x11-fonts-misc
+# For scalable fonts, currently broken see bug: 1551219
+#Requires: urw-base35-fonts
+# Because 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
@@ -105,6 +108,16 @@ appstream-util validate-relax --nonet \
%changelog
+* Sat Mar 03 2018 Hans de Goede <hdegoede@redhat.com> - 3.2.6a-7
+- Fix font issues take 2 (rhbz#1523624) :
+ - It turns out the new urw fonts are completely unusuable as X11 core fonts,
+ stop using them for now (see bug rhbz#1551219)
+ - Add a patch to use the fallback fonts for non-scalable fonts too, so that
+ we at least show something somewhat reasonable for Bookman, New Century
+ Schoolbook and Palatino
+ - This means that display of Zapf Chancery and Zapf Dingbats currently
+ falls back to the "fixed" font, which is completely wrong for Dingbats
+
* 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
reply other threads:[~2026-05-30 14:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178015131018.1.11621362279263308572.rpms-xfig-d327e0e90451@fedoraproject.org \
--to=hdegoede@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox