Fix font loading

This commit is contained in:
Lumir Balhar 2023-05-02 11:59:33 +02:00
parent 8d975f9c88
commit ba7571d5d8
2 changed files with 44 additions and 2 deletions

33
fix_font_loading.patch Normal file
View File

@ -0,0 +1,33 @@
From be61145144f61674d1c3e6130fabf3a63d9c6529 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
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 <dickey@invisible-island.net>
---
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

View File

@ -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 <lbalhar@redhat.com> - 2.3.8-2
- Fix font loading
Resolves: rhbz#2154735
* Mon Apr 24 2023 Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2.3.8-1
- libXft 2.3.8-1