New package: noto-fonts-cjk-sans-2.004

split from noto-fonts-cjk, add variable fonts
This commit is contained in:
classabbyamp 2024-08-08 05:39:22 -04:00 committed by classabbyamp
parent 802e27f025
commit bb3af536d4
4 changed files with 166 additions and 0 deletions

View File

@ -0,0 +1 @@
noto-fonts-cjk-sans

View File

@ -0,0 +1,124 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<description>Properly match Noto CJK font languages</description>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Mono CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Mono CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK HK</string>
</edit>
</match>
</fontconfig>

View File

@ -0,0 +1,40 @@
# Template file for 'noto-fonts-cjk-sans'
pkgname=noto-fonts-cjk-sans
version=2.004
revision=1
depends="font-util"
short_desc="Google Noto CJK Fonts - sans serif fonts"
maintainer="classabbyamp <void@placeviolette.net>"
license="OFL-1.1"
homepage="https://github.com/notofonts/noto-cjk"
changelog="https://raw.githubusercontent.com/notofonts/noto-cjk/main/Sans/NEWS.md"
distfiles="https://github.com/notofonts/noto-cjk/releases/download/Sans${version}/01_NotoSansCJK-OTF-VF.zip
https://github.com/notofonts/noto-cjk/releases/download/Sans${version}/03_NotoSansCJK-OTC.zip"
checksum="d5e33aebad9f8a0c0896a4a29199ef85ca966134db164426c74e83e6f13c43cd
528f4e1b25ff3badb0321b38d015d954c4c0de926c7830ef50e4a1948f6a3eed"
font_dirs="/usr/share/fonts/noto"
do_install() {
vmkdir usr/share/fonts/noto
vcopy "*.ttc" usr/share/fonts/noto
vcopy "Variable/OTC/*.ttc" usr/share/fonts/noto
vinstall ${FILESDIR}/70-noto-fonts-cjk-sans.conf 644 usr/share/fontconfig/conf.avail
vinstall ${FILESDIR}/70-noto-fonts-cjk-sans.conf 644 usr/share/fontconfig/conf.avail \
70-noto-fonts-cjk-sans-variable.conf
vmkdir etc/fonts/conf.d
ln -sf ../../../usr/share/fontconfig/conf.avail/70-noto-fonts-cjk-sans.conf ${DESTDIR}/etc/fonts/conf.d/
vlicense LICENSE
}
noto-fonts-cjk-sans-variable_package() {
short_desc="${short_desc/ - /& variable weight}"
depends="font-util"
pkg_install() {
vmove 'usr/share/fonts/noto/*VF*.ttc'
vmove usr/share/fontconfig/conf.avail/70-noto-fonts-cjk-sans-variable.conf
vmkdir etc/fonts/conf.d
ln -sf ../../../usr/share/fontconfig/conf.avail/70-noto-fonts-cjk-sans-variable.conf \
${PKGDESTDIR}/etc/fonts/conf.d/
vlicense LICENSE
}
}

View File

@ -0,0 +1 @@
pattern='/archive/refs/tags/Sans\K[\d.]+(?=\.tar\.gz")'