Make variable fonts priority more than non variable fonts. (#1739976)

This commit is contained in:
Akira TAGOH 2019-08-12 08:51:59 +00:00
parent 68d499931b
commit b8dbcbfdba
2 changed files with 70 additions and 48 deletions

View File

@ -16,7 +16,7 @@ in Unicode.\
Name: %{fontname}-fonts
Version: 20181223
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Hinted and Non Hinted OpenType fonts for Unicode scripts
License: OFL
URL: https://github.com/googlei18n/noto-fonts/
@ -88,7 +88,7 @@ Source90: %{mprio}-%{fontconf}-sans-ol-chiki.conf
Source94: %{mprio}-%{fontconf}-sans-rejang.conf
Source95: %{mprio}-%{fontconf}-sans-runic.conf
Source97: %{mprio}-%{fontconf}-sans-saurashtra.conf
Source98: %{hprio}-%{fontconf}-sans-sinhala.conf
Source98: %{mprio}-%{fontconf}-sans-sinhala.conf
Source99: %{mprio}-%{fontconf}-sans-sundanese.conf
Source101: %{mprio}-%{fontconf}-sans-syriac-eastern.conf
Source102: %{mprio}-%{fontconf}-sans-syriac-estrangela.conf
@ -136,7 +136,7 @@ Common files for Google Noto fonts.
%define pname %{_pname}%{-v:-vf}\
%{!-a:%define fname %(echo %{*} | sed -e "s/ //g")}\
%define subpkg %{_fontname}-%{pname}\
%define fconf %{-p*}%{!-p:%{mprio}}-%{fontconf}-%{pname}.conf\
%define fconf %{-p*}%{!-p:%{-v:%{hprio}}%{!-v:%{mprio}}}-%{fontconf}-%{pname}.conf\
%package -n %{subpkg}-fonts\
Summary: %{*}%{-v: variable} font\
Requires: fontpackages-filesystem\
@ -270,7 +270,7 @@ Noto %1 font%{?2: for %(echo %* | sed -e "s/%1 //")}.\
%notopkg Sans Saurashtra
%notopkg Sans Sharada
%notopkg Sans Shavian
%notopkg -p %{hprio} Sans Sinhala
%notopkg -p %{mprio} Sans Sinhala
%notopkg -p %{lprio} Sans Sinhala UI
%notopkg Sans Sora Sompeng
%notopkg Sans Sundanese
@ -405,20 +405,39 @@ install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
install -Dm 0644 -p %{SOURCE200} \
%{buildroot}%{_metainfodir}/%{_fontname}.metainfo.xml
%define fcconfbuild(a:g:p:v)\
%define fcconfbuild(a:g:l:p:v)\
%define _pname %(echo %{*} | tr "A-Z " "a-z-")\
%define pname %{_pname}%{-v:-vf}\
%define fconf %{-p*}%{!-p:%{mprio}}-%{fontconf}-%{pname}.conf\
%define fconf %{-p*}%{!-p:%{-v:%{hprio}}%{!-v:%{mprio}}}-%{fontconf}-%{pname}.conf\
cat<<_EOL_>%{buildroot}%{_fontconfig_templatedir}/%{fconf}\
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\
<fontconfig>\
<alias>\
<family>%{-g*}</family>\
<prefer>\
<family>Noto %{*}</family>\
</prefer>\
</alias>\
%{-v:<match>\
<test name="family">\
<string>%{-g*}</string>\
</test>\
%{-l:<test name="lang">\
<string>%{-l*}</string>\
</test>}\
<edit name="family" mode="prepend">\
<string>Noto %{*}</string>\
</edit>\
<edit name="fonthashint" mode="append">\
<bool>false</bool>\
</edit>\
</match>}\
%{!-v:<match>\
<test name="family">\
<string>%{-g*}</string>\
</test>\
<edit name="family" mode="prepend">\
<string>Noto %{*}</string>\
</edit>\
<edit name="fonthashint" mode="append">\
<bool>true</bool>\
</edit>\
</match>}\
<alias>\
<family>Noto %{*}</family>\
<default>\
@ -519,55 +538,55 @@ _EOL_
%fcconfbuild -g serif Serif
%fcconfbuild -v -g sans-serif Sans
%fcconfbuild -v -g sans-serif Sans Arabic
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Arabic UI
%fcconfbuild -v -g sans-serif Sans Armenian
%fcconfbuild -v -g sans-serif Sans Bengali
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Bengali UI
%fcconfbuild -v -g sans-serif -l ar Sans Arabic
%fcconfbuild -v -g sans-serif -l ar -p %{lprio} Sans Arabic UI
%fcconfbuild -v -g sans-serif -l hy Sans Armenian
%fcconfbuild -v -g sans-serif -l bn Sans Bengali
%fcconfbuild -v -g sans-serif -l bn -p %{lprio} Sans Bengali UI
%fcconfbuild -v -g sans-serif Sans Canadian Aboriginal
%fcconfbuild -v -g sans-serif Sans Cham
%fcconfbuild -v -g sans-serif Sans Cherokee
%fcconfbuild -v -g sans-serif Sans Devanagari
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Devanagari UI
%fcconfbuild -v -g sans-serif -l chr Sans Cherokee
%fcconfbuild -v -g sans-serif -l hi Sans Devanagari
%fcconfbuild -v -g sans-serif -l hi -p %{lprio} Sans Devanagari UI
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Display
%fcconfbuild -v -g sans-serif Sans Ethiopic
%fcconfbuild -v -g sans-serif Sans Georgian
%fcconfbuild -v -g sans-serif Sans Hebrew
%fcconfbuild -v -g sans-serif Sans Kannada
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Kannada UI
%fcconfbuild -v -g sans-serif Sans Khmer
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Khmer UI
%fcconfbuild -v -g sans-serif Sans Lao
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Lao UI
%fcconfbuild -v -g sans-serif Sans Malayalam
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Malayalam UI
%fcconfbuild -v -g sans-serif -l ka Sans Georgian
%fcconfbuild -v -g sans-serif -l he Sans Hebrew
%fcconfbuild -v -g sans-serif -l kn Sans Kannada
%fcconfbuild -v -g sans-serif -l kn -p %{lprio} Sans Kannada UI
%fcconfbuild -v -g sans-serif -l km Sans Khmer
%fcconfbuild -v -g sans-serif -l km -p %{lprio} Sans Khmer UI
%fcconfbuild -v -g sans-serif -l lo Sans Lao
%fcconfbuild -v -g sans-serif -l lo -p %{lprio} Sans Lao UI
%fcconfbuild -v -g sans-serif -l ml Sans Malayalam
%fcconfbuild -v -g sans-serif -l ml -p %{lprio} Sans Malayalam UI
%fcconfbuild -v -g monospace Sans Mono
%fcconfbuild -v -g sans-serif Sans Myanmar
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Myanmar UI
%fcconfbuild -v -g sans-serif -p %{hprio} Sans Sinhala
%fcconfbuild -v -g sans-serif -l si -p %{hprio} Sans Sinhala
%fcconfbuild -v -g fantasy Sans Symbols
%fcconfbuild -v -g sans-serif Sans Tamil
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Tamil UI
%fcconfbuild -v -g sans-serif -l ta Sans Tamil
%fcconfbuild -v -g sans-serif -l ta -p %{lprio} Sans Tamil UI
%fcconfbuild -v -g sans-serif Sans Thaana
%fcconfbuild -v -g sans-serif Sans Thai
%fcconfbuild -v -g sans-serif -p %{lprio} Sans Thai UI
%fcconfbuild -v -g sans-serif -l th Sans Thai
%fcconfbuild -v -g sans-serif -l th -p %{lprio} Sans Thai UI
%fcconfbuild -v -g serif Serif
%fcconfbuild -v -g serif Serif Armenian
%fcconfbuild -v -g serif -l hy Serif Armenian
%fcconfbuild -v -g serif -p %{lprio} Serif Display
%fcconfbuild -v -g serif Serif Ethiopic
%fcconfbuild -v -g serif Serif Georgian
%fcconfbuild -v -g serif Serif Gujarati
%fcconfbuild -v -g serif Serif Gurmukhi
%fcconfbuild -v -g serif Serif Hebrew
%fcconfbuild -v -g serif Serif Kannada
%fcconfbuild -v -g serif Serif Khmer
%fcconfbuild -v -g serif Serif Lao
%fcconfbuild -v -g serif -l ka Serif Georgian
%fcconfbuild -v -g serif -l gu Serif Gujarati
%fcconfbuild -v -g serif -l pa Serif Gurmukhi
%fcconfbuild -v -g serif -l he Serif Hebrew
%fcconfbuild -v -g serif -l kn Serif Kannada
%fcconfbuild -v -g serif -l km Serif Khmer
%fcconfbuild -v -g serif -l lo Serif Lao
%fcconfbuild -v -g serif Serif Myanmar
%fcconfbuild -v -g serif Serif Sinhala
%fcconfbuild -v -g serif Serif Tamil
%fcconfbuild -v -g serif Serif Tamil Slanted
%fcconfbuild -v -g serif Serif Thai
%fcconfbuild -v -g serif Serif Tibetan
%fcconfbuild -v -g serif -l si Serif Sinhala
%fcconfbuild -v -g serif -l ta Serif Tamil
%fcconfbuild -v -g serif -l ta Serif Tamil Slanted
%fcconfbuild -v -g serif -l th Serif Thai
%fcconfbuild -v -g serif -l bo Serif Tibetan
for f in \
kufi-arabic music naskh-arabic naskh-arabic-ui \
@ -662,6 +681,9 @@ done
%changelog
* Mon Aug 12 2019 Akira TAGOH <tagoh@redhat.com> - 20181223-6
- Make variable fonts priority more than non variable fonts. (#1739976)
* Fri Jul 26 2019 Parag Nemade <pnemade AT redhat DOT com> - 20181223-5
- Resolves:rh#1554988 - google-noto-sans-gurmkukhi-fonts default for pa_IN locale