From 70ab261a2e9492eb6260b590e86dbf3f5e9fc454 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 8 Mar 2022 19:39:02 +0900 Subject: [PATCH] Fix config to set Naskh Arabic as serif for fallback. --- google-noto-fonts.spec | 57 ++++++++++++++++++++++---------- google-noto-naskh-arabic-ex.conf | 12 +++++++ 2 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 google-noto-naskh-arabic-ex.conf diff --git a/google-noto-fonts.spec b/google-noto-fonts.spec index 0241fe5..8e4d99b 100644 --- a/google-noto-fonts.spec +++ b/google-noto-fonts.spec @@ -21,13 +21,14 @@ in Unicode.\ Name: %{fontname}-fonts Version: 20201206 -Release: 8%{?dist} +Release: 9%{?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 +Source3: google-noto-naskh-arabic-ex.conf BuildArch: noarch BuildRequires: fonts-rpm-macros @@ -52,13 +53,12 @@ group["monospace"] = "Noto Sans Mono" local subpackages = { { alias="cursive", family="Kufi Arabic", lang={ "ar" } }, - { alias="fantasy", family="Music" }, - { alias="cursive", family="Naskh Arabic", lang={ "ar" } }, - { alias="cursive", family="Naskh Arabic UI", lang={ "ar" }, - priority=rpm.expand('%{lprio}') - }, { alias="cursive", family="Nastaliq Urdu", lang={ "ur" } }, - { alias="serif", family="Rashi Hebrew", lang={ "he" } }, + + { alias="fantasy", family="Music" }, + { alias="fantasy", family="Sans Symbols" }, + { alias="fantasy", family="Sans Symbols2" }, + { alias="sans-serif", family="Sans" }, { alias="sans-serif", family="Sans Display", priority=rpm.expand('%{lprio}'), @@ -230,10 +230,6 @@ local subpackages = { { alias="sans-serif", family="Sans Soyombo" }, { alias="sans-serif", family="Sans Sundanese" }, { alias="sans-serif", family="Sans Syloti Nagri" }, - - { alias="fantasy", family="Sans Symbols" }, - { alias="fantasy", family="Sans Symbols2" }, - { alias="sans-serif", family="Sans Syriac", lang={ "syr" }, obsoletes={ "sans-syriac-eastern", "sans-syriac-estrangela", "sans-syriac-western" } }, @@ -280,6 +276,12 @@ local subpackages = { { alias="sans-serif", family="Sans Yi" }, { alias="sans-serif", family="Sans Zanabazar Square" }, + { alias="serif", family="Naskh Arabic", lang={ "ar" }, + fcconfexfile=rpm.expand('%{SOURCE3}') }, + { alias="serif", family="Naskh Arabic UI", lang={ "ar" }, + priority=rpm.expand('%{lprio}') + }, + { alias="serif", family="Rashi Hebrew", lang={ "he" } }, { alias="serif", family="Serif" }, { alias="serif", family="Serif Ahom" }, { alias="serif", family="Serif Armenian", lang={ "hy" } }, @@ -318,11 +320,9 @@ local subpackages = { { alias="serif", family="Traditional Nushu" }, { alias="cursive", variable=true, family="Kufi Arabic", lang={ "ar" } }, - { alias="cursive", variable=true, family="Naskh Arabic", lang={ "ar" } }, - { alias="cursive", variable=true, family="Naskh Arabic UI", lang={ "ar" }, - priority=rpm.expand('%{lprio}'), nogroup=1 - }, - { alias="serif", variable=true, family="Rashi Hebrew", lang={ "he" } }, + + { alias="fantasy", variable=true, family="Sans Symbols" }, + { alias="sans-serif", variable=true, family="Sans", priority=rpm.expand('%{hprio}') }, @@ -430,7 +430,6 @@ local subpackages = { { alias="sans-serif", variable=true, family="Sans Sora Sompeng" }, { alias="sans-serif", variable=true, family="Sans Soyombo" }, { alias="sans-serif", variable=true, family="Sans Sundanese" }, - { alias="fantasy", variable=true, family="Sans Symbols" }, { alias="sans-serif", variable=true, family="Sans Tagbanwa", lang={ "twb" } }, { alias="sans-serif", variable=true, family="Sans Tai Tham" }, { alias="sans-serif", variable=true, family="Sans Takri" }, @@ -456,6 +455,13 @@ 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="Naskh Arabic", lang={ "ar" }, + fcconfexfile=rpm.expand('%{SOURCE3}') }, + { alias="serif", variable=true, family="Naskh Arabic UI", lang={ "ar" }, + priority=rpm.expand('%{lprio}'), nogroup=1 + }, + { alias="serif", variable=true, family="Rashi Hebrew", lang={ "he" } }, { alias="serif", variable=true, family="Serif", priority=rpm.expand('%{hprio}') }, @@ -506,6 +512,19 @@ local function is_cjki(table) end local function genfcconf(table) + local extra = "\\\n" + if table.fcconfexfile then + local f = io.open(table.fcconfexfile, "r") + if f then + for line in f:lines() do + extra = extra .. line:gsub("\n$", ""):gsub("$", "\\\n") + end + extra = extra:gsub("\n\n$", "\n") + f:close() + else + error("Unable to open " .. table.fcconfexfile) + end + end local generic = [[ \ ]] .. table.alias .. [[\ @@ -544,6 +563,7 @@ local function genfcconf(table) ]] .. table.alias .. [[\ \ \ +]] .. extra .. [[ \ ]] if table.fcconffile then @@ -952,6 +972,9 @@ done %changelog +* Mon Mar 7 2022 Akira TAGOH - 20201206-9 +- Fix config to set Naskh Arabic as serif for fallback. + * Fri Feb 4 2022 Akira TAGOH - 20201206-8 - Fix the priority for Indic fonts. We postponed to replace Lohit with Noto this time. diff --git a/google-noto-naskh-arabic-ex.conf b/google-noto-naskh-arabic-ex.conf new file mode 100644 index 0000000..d5440b6 --- /dev/null +++ b/google-noto-naskh-arabic-ex.conf @@ -0,0 +1,12 @@ + + + sans-serif + + + ar + + + Noto Sans Arabic + Noto Naskh Arabic + +