From 46887d0ff906d66365ce7155404909fdf6502ebb Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 19 Jan 2022 13:52:05 +0900 Subject: [PATCH] Update the priority of fontconfig config for Noto Sans, Noto Serif and Noto Sans Mono to make them default. --- google-noto-fonts.spec | 43 +++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/google-noto-fonts.spec b/google-noto-fonts.spec index ff6d32d..bc49876 100644 --- a/google-noto-fonts.spec +++ b/google-noto-fonts.spec @@ -10,17 +10,19 @@ in Unicode.\ %{nil} %global srcver 20201206-phase3 -%global hprio 65 -%global mprio 66 -%global lprio 67 +%global hprio 56 +%global mprio 58 +%global lprio 62 Name: %{fontname}-fonts Version: 20201206 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Hinted and Non Hinted OpenType fonts for Unicode scripts License: OFL URL: https://github.com/googlefonts/noto-fonts/ Source0: https://github.com/googlefonts/noto-fonts/archive/v20201206-phase3.tar.gz#/noto-fonts-%{srcver}.tar.gz +Source1: google-noto-sans-math-vf.conf +Source2: google-noto-sans-math.conf BuildArch: noarch BuildRequires: fonts-rpm-macros @@ -316,7 +318,9 @@ local subpackages = { priority=rpm.expand('%{lprio}'), nogroup=1 }, { alias="serif", variable=true, family="Rashi Hebrew", lang={ "he" } }, - { alias="sans-serif", variable=true, family="Sans" }, + { alias="sans-serif", variable=true, family="Sans", + priority=rpm.expand('%{hprio}') + }, { alias="sans-serif", variable=true, family="Sans Adlam" }, { alias="sans-serif", variable=true, family="Sans Adlam Unjoined" }, { alias="sans-serif", variable=true, family="Sans Anatolian Hieroglyphs" }, @@ -393,7 +397,9 @@ local subpackages = { { alias="sans-serif", variable=true, family="Sans Mayan Numerals" }, { alias="sans-serif", variable=true, family="Sans Medefaidrin" }, { alias="sans-serif", variable=true, family="Sans MeeteiMayek" }, - { alias="monospace", variable=true, family="Sans Mono" }, + { alias="monospace", variable=true, family="Sans Mono", + priority=rpm.expand('%{hprio}') + }, { alias="sans-serif", variable=true, family="Sans Mro" }, { alias="sans-serif", variable=true, family="Sans Multani" }, { alias="sans-serif", variable=true, family="Sans Myanmar", lang={ "my" }, @@ -445,7 +451,9 @@ local subpackages = { { alias="sans-serif", variable=true, family="Sans Zanabazar Square" }, { alias="sans-serif", variable=true, family="Sans Thai Looped", lang={ "th" }, obsoletes={ "sansthai-looped-vf" } }, - { alias="serif", variable=true, family="Serif" }, + { alias="serif", variable=true, family="Serif", + priority=rpm.expand('%{hprio}') + }, { alias="serif", variable=true, family="Serif Armenian", lang={ "hy" } }, { alias="serif", variable=true, family="Serif Bengali", lang={ "bn" } }, { alias="serif", variable=true, family="Serif Devanagari", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" } }, @@ -517,8 +525,22 @@ local function genfcconf(table) ]] .. table.alias .. [[\ \ \ -\]] - _fcconfbuild = (_fcconfbuild ~= '' and _fcconfbuild .. "\n" or '') .. "cat<<_EOL_>" .. table.fcconf .. "\\\n" .. xml .. "\n_EOL_\\" +\ +]] + if table.fcconffile then + local f = io.open(table.fcconffile, "r") + if f then + xml = "" + for line in f:lines() do + xml = xml .. line:gsub("\n$", ""):gsub("$", "\\\n") + end + xml = xml:gsub("\n\n$", "\n") + f:close() + else + error("Unable to open " .. table.fcconffile) + end + end + _fcconfbuild = _fcconfbuild .. "cat<<_EOL_>" .. table.fcconf .. "\\\n" .. xml .. "_EOL_\\\n" end -- Borrowed from fonts-rpm-macros @@ -894,6 +916,9 @@ done %changelog +* Wed Jan 19 2022 Akira TAGOH - 20201206-6 +- Update the priority of fontconfig config for Noto Sans, Noto Serif and Noto Sans Mono to make them default. + * Tue Dec 14 2021 Akira TAGOH - 20201206-5 - Fix a typo in the package name. google-noto-sansthai-looped-vf-fonts should be google-noto-sans-thai-looped-vf-fonts.