diff --git a/fix_font_loading.patch b/fix_font_loading.patch new file mode 100644 index 0000000..f45c0b8 --- /dev/null +++ b/fix_font_loading.patch @@ -0,0 +1,33 @@ +From be61145144f61674d1c3e6130fabf3a63d9c6529 Mon Sep 17 00:00:00 2001 +From: "Thomas E. Dickey" +Date: Sun, 30 Apr 2023 20:19:04 -0400 +Subject: [PATCH] issue 19: Problem loading "SourceCodePro-Regular" font in + Fedora + +Ignore face flag FT_FACE_FLAG_COLOR if FT_FACE_FLAG_SVG is set, +allowing adobe-source-code-pro font to work. + +This bug was introduced by a change in freetype2 #1151, + 62bc04f4c5b4369cc493ff24b1de27aabd79e0c6 + +Signed-off-by: Thomas E. Dickey +--- + src/xftfreetype.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xftfreetype.c b/src/xftfreetype.c +index b91f8f4..9fa91db 100644 +--- a/src/xftfreetype.c ++++ b/src/xftfreetype.c +@@ -849,7 +849,7 @@ XftFontOpenInfo (Display *dpy, + if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) + antialias = FcFalse; + +- color = FT_HAS_COLOR(face) ? FcTrue : FcFalse; ++ color = (FT_HAS_COLOR(face) && !FT_HAS_SVG(face)) ? FcTrue : FcFalse; + + /* + * Find the appropriate picture format +-- +GitLab + diff --git a/libXft.spec b/libXft.spec index 3b6d146..529bede 100644 --- a/libXft.spec +++ b/libXft.spec @@ -1,12 +1,17 @@ Summary: X.Org X11 libXft runtime library Name: libXft Version: 2.3.8 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT URL: http://www.x.org Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz +# Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2154735 +# Upstream issue: https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/19 +# Upstream fix: https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/26 +Patch: fix_font_loading.patch + BuildRequires: make BuildRequires: xorg-x11-util-macros BuildRequires: autoconf automake libtool @@ -27,7 +32,7 @@ Requires: %{name} = %{version}-%{release} X.Org X11 libXft development package %prep -%setup -q +%autosetup -p1 %build autoreconf -v --install --force @@ -59,6 +64,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_mandir}/man3/Xft*.3* %changelog +* Tue May 02 2023 Lumír Balhar - 2.3.8-2 +- Fix font loading +Resolves: rhbz#2154735 + * Mon Apr 24 2023 Benjamin Tissoires - 2.3.8-1 - libXft 2.3.8-1