Fix the priority for Indic fonts.
We postponed to replace Lohit with Noto this time. Resolves: rhbz#2050477
This commit is contained in:
parent
887fb209e0
commit
b8404861fd
@ -11,12 +11,17 @@ in Unicode.\
|
||||
|
||||
%global srcver 20201206-phase3
|
||||
%global hprio 56
|
||||
%global vmprio 57
|
||||
%global mprio 58
|
||||
%global lprio 62
|
||||
%global cjki_hprio 65-0
|
||||
%global cjki_vmprio 65-2
|
||||
%global cjki_mprio 66
|
||||
%global cjki_lprio 67
|
||||
|
||||
Name: %{fontname}-fonts
|
||||
Version: 20201206
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Summary: Hinted and Non Hinted OpenType fonts for Unicode scripts
|
||||
License: OFL
|
||||
URL: https://github.com/googlefonts/noto-fonts/
|
||||
@ -486,6 +491,20 @@ local _metafilelist = ''
|
||||
local _fcconfbuild = ''
|
||||
local _metainfobuild = ''
|
||||
|
||||
local function is_cjki(table)
|
||||
cjki_langs = { "as", "bn", "brx", "doi", "gu", "hi", "ja", "kn", "ks@devanagari", "kok", "kr", "mai", "mr", "ne", "or", "sa", "sat", "sd@devanagari", "ta", "te", "zh-cn", "zh-hk", "zh-mo", "zh-sg", "zh-tw" }
|
||||
if table.lang then
|
||||
for i = 1, #table.lang do
|
||||
for j = 1, #cjki_langs do
|
||||
if table.lang[i] == cjki_langs[j] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function genfcconf(table)
|
||||
local generic = [[
|
||||
<test name="family">\
|
||||
@ -792,7 +811,24 @@ local function notopkg(table)
|
||||
local _pname = string.lower(table.family):gsub(' ', '-')
|
||||
local pname = _pname .. (table.variable and '-vf' or '')
|
||||
local pkgname = rpm.expand('%{_fontname}-') .. pname .. '-fonts'
|
||||
local prio = tostring((table.priority and table.priority or (table.variable and rpm.expand('%{hprio}') or rpm.expand('%{mprio}'))))
|
||||
local prio = (table.priority and table.priority or (table.variable and rpm.expand('%{hprio}') or rpm.expand('%{mprio}')))
|
||||
|
||||
if is_cjki(table) then
|
||||
if prio == rpm.expand('%{hprio}') then
|
||||
if table.priority then
|
||||
prio = rpm.expand('%{cjki_hprio}')
|
||||
else
|
||||
prio = rpm.expand('%{cjki_vmprio}')
|
||||
end
|
||||
elseif prio == rpm.expand('%{mprio}') then
|
||||
prio = rpm.expand('%{cjki_mprio}')
|
||||
elseif prio == rpm.expand('%{lprio}') then
|
||||
prio = rpm.expand('%{cjki_lprio}')
|
||||
else
|
||||
io.stderr:write("Unknown priority")
|
||||
end
|
||||
end
|
||||
prio = tostring(prio)
|
||||
local fcconf = prio .. '-' .. rpm.expand('%{fontconf}') .. '-' .. pname .. '.conf'
|
||||
local fontdir = rpm.expand('%{_fontbasedir}') .. '/google-noto' .. (table.variable and '-vf/' or '/')
|
||||
local fontname = 'Noto' .. (table.fontname and table.fontname or string.gsub(table.family, ' ', '')) .. (table.variable and '-*VF*.*tf' or '-[^VF]*.*tf')
|
||||
@ -916,6 +952,11 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 4 2022 Akira TAGOH <tagoh@redhat.com> - 20201206-8
|
||||
- Fix the priority for Indic fonts.
|
||||
We postponed to replace Lohit with Noto this time.
|
||||
Resolves: rhbz#2050477
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20201206-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user