import CS redhat-fonts-4.0.3-2.el9

This commit is contained in:
eabdullin 2025-03-11 08:06:00 +00:00
parent 0fe8abd012
commit 6558666365
2 changed files with 232 additions and 3 deletions

View File

@ -1,6 +1,224 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!--
- This scan pattern aims to correct properties to:
- * keep consistency between RedHatMono and RedHatMono-Italic
- * provide single family name e.g. Red Hat Mono
- * provide single familylang because of the above
- * provide single style name e.g. like :family=Red Hat Mono:style=Light
- but :family=Red Hat Mono Light:style=Regular
- * provide single stylelang because of the above
- * set different family name of the variable font pattern to avoid conflict
-->
<fontconfig>
<!-- Try to workaround broken family name in RedHatMono.ttf -->
<!-- For Light -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Regular</string>
</test>
<test name="style" compare="eq">
<string>Light</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono Light -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
<edit name="stylelang" mode="delete" /> <!-- Drop stylelang once -->
<edit name="stylelang" mode="append"> <!-- Add single stylelang again -->
<string>en</string>
</edit>
<edit name="style" mode="delete" /> <!-- Drop Regular -->
</match>
<!-- For Medium -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light</string>
</test>
<test name="style" compare="eq">
<string>Medium</string>
</test>
<edit name="family" mode="assign">
<string>Red Hat Mono VF</string>
</edit>
</match>
<!-- For SemiBold -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>SemiBold</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono Light -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- For Bold -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Bold</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono Light -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- For Regular -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Regular</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono Light -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- Try to workaround broken family name in RedHatMono-Italic.ttf -->
<!-- For Light -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light Italic</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Regular</string>
</test>
<test name="style" compare="eq">
<string>Light Italic</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono VF Light Italic -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
<edit name="stylelang" mode="delete" /> <!-- Drop stylelang once -->
<edit name="stylelang" mode="append"> <!-- Add single stylelang again -->
<string>en</string>
</edit>
<edit name="style" mode="delete" /> <!-- Drop Regular -->
</match>
<!-- For Medium -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light Italic</string>
</test>
<test name="style" compare="eq">
<string>Medium Italic</string>
</test>
<edit name="family" mode="assign">
<string>Red Hat Mono VF</string>
</edit>
</match>
<!-- For SemiBold -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light Italic</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>SemiBold Italic</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono VF Light Italic -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- For Bold -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light Italic</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Bold Italic</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono VF Light Italic -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- For Regular -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF Light Italic</string>
</test>
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="style" compare="eq">
<string>Italic</string>
</test>
<edit name="family" mode="delete" /> <!-- Drop Red Hat Mono VF Light Italic -->
<edit name="familylang" mode="delete" /> <!-- Drop familylang once -->
<edit name="familylang" mode="append"> <!-- Add single familylang again -->
<string>en</string>
</edit>
</match>
<!-- For variable font -->
<match target="scan">
<test name="family" compare="eq">
<string>Red Hat Mono VF</string>
</test>
<test name="file" compare="contains">
<string>RedHatMonoVF-Italic</string>
</test>
<test name="variable">
<bool>true</bool>
</test>
<edit name="family" mode="assign">
<!-- Rewrite family name to Red Hat Mono Italic to avoid confusion for Red Hat Mono -->
<string>Red Hat Mono VF Italic</string>
</edit>
</match>
<!-- Generic name assignment -->
<alias>
<family>Red Hat Mono VF</family>
<default>
<family>monospace</family>
</default>
</alias>
<!-- Generic name aliasing -->
<alias>
<family>monospace</family>
<prefer>
<family>Red Hat Mono VF</family>
</prefer>
</alias>
<!-- Generic name assignment -->
<alias>
<family>Red Hat Mono</family>

View File

@ -26,7 +26,7 @@ and designed by Jeremy Mickel / MCKL for the new Red Hat identity.
Name: %{fontname}-fonts
Version: 4.0.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Red Hat Typeface fonts
# Only the metainfo files are CC-BY-SA
License: OFL and CC-BY-SA
@ -80,7 +80,11 @@ This package provides the Monospace fonts variant.
# Install fonts
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p fonts/*/static/otf/*.otf %{buildroot}%{_fontdir}
install -m 0644 -p fonts/*/static/ttf/*.ttf %{buildroot}%{_fontdir}
rm -f fonts/*/*\[wght\].ttf fonts/mono/RedHatMono{,-Italic}.ttf
rm -f fonts/*/*VF-Italic*.ttf
for i in fonts/*/*Modified.ttf; do
rm ${i/Modified/}
done
install -m 0644 -p fonts/*/*.ttf %{buildroot}%{_fontdir}
# Install fontconfig data
@ -126,6 +130,13 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainf
%changelog
* Thu Nov 21 2024 Akira TAGOH <tagoh@redhat.com> - 4.0.3-2
- Drop duplicate font files.
- Correct broken font metadata in fontconfig.
- Drop Italic variant of the variable fonts to workaround
unexpected italic rendering and crash.
Resolves: RHEL-1617
* Wed Aug 03 2022 Neal Gompa <ngompa@centosproject.org> - 4.0.3-1
- Update to 4.0.3 to fix grave accent rendering issue with Red Hat Mono
Resolves: rhbz#2115107