Skip to content

google noto cjk fonts split into sans and serif #14418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: 3.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@
"google-guice",
"google-noto-cjk-fonts",
"google-noto-emoji-fonts",
"google-noto-sans-cjk-fonts",
"google-noto-serif-cjk-fonts",
"google-roboto-slab-fonts",
"gphoto2",
"gpm",
Expand Down
112 changes: 112 additions & 0 deletions SPECS/google-noto-sans-cjk-fonts/65-google-noto-sans-cjk-fonts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="scan">
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans CJK TC</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans CJK HK</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-cn</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans CJK JP</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ko</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans CJK KR</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
</fontconfig>
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="scan">
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans Mono CJK TC</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans Mono CJK HK</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>ko</string>
<string>zh-cn</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans Mono CJK JP</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ko</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
<match target="scan">
<test name="family">
<string>Noto Sans Mono CJK KR</string>
</test>
<edit name="lang" mode="assign">
<minus>
<name>lang</name>
<langset>
<string>ja</string>
<string>zh-cn</string>
<string>zh-hk</string>
<string>zh-mo</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>cmn</string>
<string>hak</string>
<string>lzh</string>
<string>nan</string>
<string>yue</string>
</langset>
</minus>
</edit>
</match>
</fontconfig>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Signatures": {
"65-google-noto-sans-cjk-fonts.conf": "decac9dd165405677b0dc280c626c5676c49f663e32c8b78944390479b0aa84c",
"65-google-noto-sans-cjk-mono-fonts.conf": "e81260113439221bdc20d7f03166e3bfb8466ce987b04613099549b2038f9360",
"google-noto-sans-cjk-fonts-2.004-genfontconf.py": "127ef5c0fb1ae8d0598ac210b6463762bf5e84ae7ad4a6bce1d6824b4f39a44f",
"google-noto-sans-cjk-fonts-2.004.zip": "528f4e1b25ff3badb0321b38d015d954c4c0de926c7830ef50e4a1948f6a3eed"
}
}
114 changes: 114 additions & 0 deletions SPECS/google-noto-sans-cjk-fonts/google-noto-sans-cjk-fonts.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Name: google-noto-sans-cjk-fonts
Version: 2.004
Release: 11%{?dist}
Summary: google-noto-sans-cjk-fonts for fonts
License: OFL
Vendor: Microsoft Corporation
Distribution: Azure Linux

URL: https://github.com/googlefonts/noto-cjk
Source0: https://github.com/googlefonts/noto-cjk/releases/download/Sans%{version}/03_NotoSansCJK-OTC.zip#/%{name}-%{version}.zip
Source1: %{name}-%{version}-genfontconf.py
Source10: 65-google-noto-sans-cjk-fonts.conf
Source11: 65-google-noto-sans-cjk-mono-fonts.conf

BuildRequires: python3
BuildRequires: unzip

%description
Noto CJK fonts, supporting Simplified Chinese, Traditional Chinese, \
Japanese, and Korean. The supported scripts are Han, Hiragana, Katakana, \
Hangul, and Bopomofo. Latin, Greek, Cyrllic, and various symbols are also \
supported for compatibility with CJK standards.

The google-noto-sans-cjk-fonts package contains Google Noto Sans CJK fonts.

%prep
unzip %{SOURCE0}
cp %{SOURCE1} .

python3 genfontconf.py "ja" "monospace" "Noto Sans Mono CJK JP" \
"ja" "sans-serif" "Noto Sans CJK JP" \
"ko" "monospace" "Noto Sans Mono CJK KR" \
"ko" "sans-serif" "Noto Sans CJK KR" \
"zh-cn:zh-sg" "monospace" "Noto Sans Mono CJK SC" \
"zh-cn:zh-sg" "sans-serif" "Noto Sans CJK SC" \
"zh-tw:cmn:hak:lzh:nan" "monospace" "Noto Sans Mono CJK TC" \
"zh-tw:cmn:hak:lzh:nan" "sans-serif" "Noto Sans CJK TC" \
"zh-hk:zh-mo:yue" "monospace" "Noto Sans Mono CJK HK" \
"zh-hk:zh-mo:yue" "sans-serif" "Noto Sans CJK HK" \
| xmllint --format - |tee 65-1-google-noto-sans-cjk-fonts.conf


%build
# no build

%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttc %{buildroot}%{_fontdir}

install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
%{buildroot}%{_fontconfig_confdir}

install -m 0644 -p %{SOURCE10} %{buildroot}%{_fontconfig_templatedir}/65-%{name}.conf
install -m 0644 -p %{SOURCE11} %{buildroot}%{_fontconfig_templatedir}/65-google-noto-sans-cjk-mono-fonts.conf
install -m 0644 -p 65-1-%{name}.conf %{buildroot}%{_fontconfig_templatedir}/65-1-%{name}.conf


ln -s %{_fontconfig_templatedir}/65-%{name}.conf \
%{buildroot}%{_fontconfig_confdir}/65-%{name}.conf
ln -s %{_fontconfig_templatedir}/65-google-noto-sans-cjk-mono-fonts.conf \
%{buildroot}%{_fontconfig_confdir}/65-google-noto-sans-cjk-mono-fonts.conf
ln -s %{_fontconfig_templatedir}/65-1-%{name}.conf %{buildroot}%{_fontconfig_confdir}/65-1-%{name}.conf

%files
%{_fontdir}/*.ttc
%{_fontconfig_templatedir}/65-%{name}.conf
%{_fontconfig_templatedir}/65-google-noto-sans-cjk-mono-fonts.conf
%{_fontconfig_templatedir}/65-1-google-noto-sans-cjk-fonts.conf
%{_fontconfig_confdir}/65-%{name}.conf
%{_fontconfig_confdir}/65-google-noto-sans-cjk-mono-fonts.conf
%{_fontconfig_confdir}/65-1-%{name}.conf
%license LICENSE

%changelog
* Wed Jul 30 2025 Kavya Sree Kaitepalli <[email protected]> - 2.004-11
- License verified
- Initial Azure Linux import from Fedora 43 (license: MIT).

* Thu Jul 24 2025 Fedora Release Engineering <[email protected]> - 1:2.004-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild

* Fri Jan 17 2025 Fedora Release Engineering <[email protected]> - 1:2.004-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Thu Jul 18 2024 Fedora Release Engineering <[email protected]> - 1:2.004-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Wed Jan 24 2024 Fedora Release Engineering <[email protected]> - 1:2.004-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sat Jan 20 2024 Fedora Release Engineering <[email protected]> - 1:2.004-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Oct 6 2023 Akira TAGOH <[email protected]> - 1:2.004-5
- Drop Conflict: google-noto-sans-cjk-vf-fonts to get them installed together.
fontconfig basically estimate same score for both but static font still has
a priority because of path name. This works as a workaround for some issues
related to variable fonts.
Resolves: rhbz #2240646

* Thu Jul 20 2023 Fedora Release Engineering <[email protected]> - 1:2.004-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Mar 24 2023 Peng Wu <[email protected]> - 1:2.004-3
- Fix dnf upgrade issue
- Resolves: RHBZ#2181349

* Thu Mar 16 2023 Peng Wu <[email protected]> - 1:2.004-2
- Update the spec file with some Obsoletes and Provides

* Fri Feb 3 2023 Peng Wu <[email protected]> - 1:2.004-1
- Initial Packaging
- Migrate to SPDX license

Loading
Loading