provide the correct font config

This commit is contained in:
Fabio Alessandro Locati 2020-07-07 11:57:55 +02:00
parent 8a777a8d9b
commit c0695e1682
No known key found for this signature in database
GPG Key ID: 6C87B5F613A3F7F8
2 changed files with 38 additions and 12 deletions

View File

@ -1,16 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd"> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig> <fontconfig>
<alias> <match target="scan">
<family>FontAwesome</family> <test name="family">
<string>Font Awesome 5 Free</string>
</test>
<edit name="family">
<string>FontAwesome</string>
</edit>
<edit name="fullname">
<string>FontAwesome</string>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Font Awesome 5 Brands</string>
</test>
<edit name="family">
<string>FontAwesome</string>
</edit>
<edit name="fullname">
<string>FontAwesome</string>
</edit>
</match>
<alias>
<family>fantasy</family>
<prefer> <prefer>
<family>fantasy</family> <family>FontAwesome</family>
</prefer> </prefer>
</alias> </alias>
<alias> <alias>
<family>fantasy</family> <family>FontAwesome</family>
<default> <default>
<family>FontAwesome</family> <family>fantasy</family>
</default> </default>
</alias> </alias>
</fontconfig> </fontconfig>

View File

@ -3,7 +3,7 @@
Name: %{fontname}-fonts Name: %{fontname}-fonts
Version: 5.13.1 Version: 5.13.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Iconic font set Summary: Iconic font set
License: OFL License: OFL
@ -11,10 +11,11 @@ URL: http://fontawesome.io
Source0: https://github.com/FortAwesome/Font-Awesome/archive/%{version}.tar.gz Source0: https://github.com/FortAwesome/Font-Awesome/archive/%{version}.tar.gz
Source1: %{name}-fontconfig.conf Source1: %{name}-fontconfig.conf
Source2: README-Trademarks.txt Source2: README-Trademarks.txt
BuildArch: noarch BuildArch: noarch
BuildRequires: fontpackages-devel BuildRequires: fontpackages-devel
BuildRequires: ttembed BuildRequires: ttembed
Requires: fontpackages-filesystem Requires: fontpackages-filesystem
Provides: font(fontawesome)
%description %description
Font Awesome gives you scalable vector icons that can instantly be Font Awesome gives you scalable vector icons that can instantly be
@ -39,7 +40,7 @@ Format versions 1 and 2, Embedded OpenType and SVG font files which are
typically used on the web. typically used on the web.
%prep %prep
%setup -q -n Font-Awesome-%{version} %autosetup -n Font-Awesome-%{version}
cp -p %{SOURCE2} . cp -p %{SOURCE2} .
%build %build
@ -47,7 +48,7 @@ ttembed webfonts/*.ttf otfs/*.otf
%install %install
install -m 0755 -d %{buildroot}%{_fontdir} install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p webfonts/*.ttf otfs/*.otf webfonts/*.woff webfonts/*.svg webfonts/*.woff2 webfonts/*.eot %{buildroot}%{_fontdir} install -m 0644 -p otfs/*.otf webfonts/*.woff webfonts/*.svg webfonts/*.woff2 webfonts/*.eot %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} %{buildroot}%{_fontconfig_confdir} install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} %{buildroot}%{_fontconfig_confdir}
install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/%{fontconf} install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
ln -s %{_fontconfig_templatedir}/%{fontconf} %{buildroot}%{_fontconfig_confdir}/%{fontconf} ln -s %{_fontconfig_templatedir}/%{fontconf} %{buildroot}%{_fontconfig_confdir}/%{fontconf}
@ -55,12 +56,11 @@ mkdir -p %{buildroot}%{_datadir}/font-awesome-web/
cp -a css less scss %{buildroot}%{_datadir}/font-awesome-web/ cp -a css less scss %{buildroot}%{_datadir}/font-awesome-web/
# files: # files:
%_font_pkg -f %{fontconf} *.ttf *.otf %_font_pkg -f %{fontconf} *.otf
%exclude %{_datadir}/fonts/fontawesome/fa-*.svg %exclude %{_datadir}/fonts/fontawesome/fa-*.svg
%exclude %{_datadir}/fonts/fontawesome/fa-*.woff %exclude %{_datadir}/fonts/fontawesome/fa-*.woff
%exclude %{_datadir}/fonts/fontawesome/fa-*.woff2 %exclude %{_datadir}/fonts/fontawesome/fa-*.woff2
%exclude %{_datadir}/fonts/fontawesome/fa-*.eot %exclude %{_datadir}/fonts/fontawesome/fa-*.eot
%doc README-Trademarks.txt %doc README-Trademarks.txt
%files web %files web
@ -71,6 +71,10 @@ cp -a css less scss %{buildroot}%{_datadir}/font-awesome-web/
%{_datadir}/fonts/fontawesome/fa-*.eot %{_datadir}/fonts/fontawesome/fa-*.eot
%changelog %changelog
* Tue Jul 07 2020 Fabio Alessandro Locati <fale@fedoraproject.org> - 5.13.1-2
- Provide the right font configuration
- Drop ttf format since upstream affirms that otf is to be preferred
* Sun Jul 05 2020 Fabio Alessandro Locati <fale@fedoraproject.org> - 5.13.1-1 * Sun Jul 05 2020 Fabio Alessandro Locati <fale@fedoraproject.org> - 5.13.1-1
- Update to 5.13.1 - Update to 5.13.1