summaryrefslogtreecommitdiffstats
path: root/system/CNS11643-font
diff options
context:
space:
mode:
author ltlnx2023-10-25 14:17:15 +0200
committer Willy Sudiarto Raharjo2023-10-26 03:33:10 +0200
commit035c0e5ec84a6af8bd1f88a8de7877d350b05981 (patch)
tree90d1a61edf52023126920d3a42f482c2cd955024 /system/CNS11643-font
parentb69d4debde64ecc391b7309267558ce8408d019f (diff)
downloadslackbuilds-035c0e5ec84a6af8bd1f88a8de7877d350b05981.tar.gz
system/CNS11643-font: Updated for version 20230519.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/CNS11643-font')
-rw-r--r--system/CNS11643-font/35-CNS11643-font-patches.conf101
-rw-r--r--system/CNS11643-font/35-CNS11643-font.conf (renamed from system/CNS11643-font/99-CNS11643-font.conf)0
-rw-r--r--system/CNS11643-font/CNS11643-font.SlackBuild18
-rw-r--r--system/CNS11643-font/CNS11643-font.info6
-rw-r--r--system/CNS11643-font/README76
5 files changed, 65 insertions, 136 deletions
diff --git a/system/CNS11643-font/35-CNS11643-font-patches.conf b/system/CNS11643-font/35-CNS11643-font-patches.conf
deleted file mode 100644
index 55b0af8cd6..0000000000
--- a/system/CNS11643-font/35-CNS11643-font-patches.conf
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<!-- Patch file to make sure default fonts don't get replaced-->
-<fontconfig>
- <match target="font">
- <test name="lang" compare="contains">
- <string>zh_TW</string>
- </test>
- <alias>
- <family>sans-serif</family>
- <prefer>
- <family>{{SANS_FONT}}</family>
- <family>Noto Sans CJK TC</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>zh_TW</string>
- </test>
- <alias>
- <family>monospace</family>
- <prefer>
- <family>{{MONOSPACE_FONT}}</family>
- <family>Noto Sans CJK TC</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>zh_CN</string>
- </test>
- <alias>
- <family>sans-serif</family>
- <prefer>
- <family>{{SANS_FONT}}</family>
- <family>Noto Sans CJK SC</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>zh_CN</string>
- </test>
- <alias>
- <family>monospace</family>
- <prefer>
- <family>{{MONOSPACE_FONT}}</family>
- <family>Noto Sans CJK SC</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>ja</string>
- </test>
- <alias>
- <family>sans-serif</family>
- <prefer>
- <family>{{SANS_FONT}}</family>
- <family>Noto Sans CJK JP</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>ja</string>
- </test>
- <alias>
- <family>monospace</family>
- <prefer>
- <family>{{MONOSPACE_FONT}}</family>
- <family>Noto Sans CJK JP</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>ko</string>
- </test>
- <alias>
- <family>sans-serif</family>
- <prefer>
- <family>{{SANS_FONT}}</family>
- <family>Noto Sans CJK KR</family>
- </prefer>
- </alias>
- </match>
- <match target="font">
- <test name="lang" compare="contains">
- <string>ko</string>
- </test>
- <alias>
- <family>monospace</family>
- <prefer>
- <family>{{MONOSPACE_FONT}}</family>
- <family>Noto Sans CJK KR</family>
- </prefer>
- </alias>
- </match>
-</fontconfig>
diff --git a/system/CNS11643-font/99-CNS11643-font.conf b/system/CNS11643-font/35-CNS11643-font.conf
index b23d2b29e7..b23d2b29e7 100644
--- a/system/CNS11643-font/99-CNS11643-font.conf
+++ b/system/CNS11643-font/35-CNS11643-font.conf
diff --git a/system/CNS11643-font/CNS11643-font.SlackBuild b/system/CNS11643-font/CNS11643-font.SlackBuild
index 843a84c0c2..ef62076adf 100644
--- a/system/CNS11643-font/CNS11643-font.SlackBuild
+++ b/system/CNS11643-font/CNS11643-font.SlackBuild
@@ -26,9 +26,9 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=CNS11643-font
-VERSION=${VERSION:-20230323}
+VERSION=${VERSION:-20230519}
SRCNAM=Open_Data
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -62,24 +62,14 @@ find -L . \
mkdir -p $PKG/usr/share/fonts/TTF
cp -a Open_Data/Fonts/*.ttf $PKG/usr/share/fonts/TTF
-# Add config for Noto Fonts if the user asks for it.
-NOTOPATCH=${NOTOPATCH:-no}
-if [ "$NOTOPATCH" = "yes" ]; then
- mkdir -p $PKG/etc/fonts/conf.{d,avail}
- cat $CWD/35-CNS11643-font-patches.conf | sed "s|{{SANS_FONT}}|$(fc-match -f "%{family[0]}" sans-serif)|g; s|{{MONOSPACE_FONT}}|$(fc-match -f "%{family[0]}" monospace)|g" > $PKG/etc/fonts/conf.avail/35-CNS11643-font-patches.conf
- ( cd $PKG/etc/fonts/conf.d && \
- ln -sf ../conf.avail/35-CNS11643-font-patches.conf
- )
-fi
-
# Create a font config file and symlink it into /etc/fonts/conf.d.
# Do this only if the user explicitly asks for it.
ADDCONF=${ADDCONF:-no}
if [ "$ADDCONF" = "yes" ]; then
mkdir -p $PKG/etc/fonts/conf.{d,avail}
- cat $CWD/99-CNS11643-font.conf > $PKG/etc/fonts/conf.avail/99-CNS11643-font.conf
+ cat $CWD/35-CNS11643-font.conf > $PKG/etc/fonts/conf.avail/35-CNS11643-font.conf
( cd $PKG/etc/fonts/conf.d && \
- ln -sf ../conf.avail/99-CNS11643-font.conf
+ ln -sf ../conf.avail/35-CNS11643-font.conf
)
fi
diff --git a/system/CNS11643-font/CNS11643-font.info b/system/CNS11643-font/CNS11643-font.info
index 48fcfe39e9..7f6e5d1a8a 100644
--- a/system/CNS11643-font/CNS11643-font.info
+++ b/system/CNS11643-font/CNS11643-font.info
@@ -1,10 +1,10 @@
PRGNAM="CNS11643-font"
-VERSION="20230323"
+VERSION="20230519"
HOMEPAGE="http://www.cns11643.gov.tw/"
DOWNLOAD="http://www.cns11643.gov.tw/AIDB/Open_Data.zip"
-MD5SUM="3e4539c6cdbbc542b1418c8474d411f7"
+MD5SUM="676a15dfd5189f09333f349b40c24c79"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="ltlnx"
-EMAIL="ltlnx@gmx.com"
+EMAIL="ltlnx@disroot.org"
diff --git a/system/CNS11643-font/README b/system/CNS11643-font/README
index 696a424d74..674ef9135d 100644
--- a/system/CNS11643-font/README
+++ b/system/CNS11643-font/README
@@ -2,30 +2,70 @@ This package contains two type of fonts: TW-Kai and TW-Sung, which are
provided by CNS11643 Chinese Standard Interchange Code Master Ideographs
from Taiwan.
-Two config files are available in this SlackBuild package: one is a
-config file that adds the Noto Sans CJK family to a higher spot in
-"sans-serif" substitutes for supported languages (Chinese, Japanese,
-Korean). You would want to enable this if you're using a desktop
-environment that has Noto Sans CJK as the default fallback, otherwise
-the fallback font would be replaced.
-
-To enable this config, add the environment variable "NOTOPATCH=yes" in
-front of the SlackBuild command, and run it as such:
+A config file is included, 35-CNS11643-font.conf, which binds the
+Windows counterparts "MingLiU" (細明體) and "PMingLiU"
+(新細明體) to TW-Sung, and "DFKai-SB", "UKai" (標楷體) to TW-Kai.
+If you want it copied into /etc/fonts/conf.avail, add the
+environment variable "ADDCONF=yes" in front of the SlackBuild.
+I recommend running the SlackBuild like this:
- NOTOPATCH=yes ./CNS11643-font.SlackBuild
+ ADDCONF=yes ./CNS11643-font.SlackBuild
If you're using a SlackBuild manager, the way of adding variables may
differ; please consult the manual of your program for instructions.
-Another config file is included, 35-CNS11643-font.conf, that
-binds the Windows counterparts "MingLiU" (細明體) and "PMingLiU"
-(新細明體) to TW-Sung, and "DFKai-SB", "UKai" (標楷體) to TW-Kai.
-If you want it copied into /etc/fonts/conf.avail, add the
-environment variable "ADDCONF=yes" in front of the SlackBuild.
-
-Therefore I recommend running the SlackBuild like this:
+If you don't want your default fonts replaced, you can add this to
+/etc/fonts/conf.avail/50-user.conf between the <fontconfig> tags:
+(please replace the font names according to the comments)
- ADDCONF=yes NOTOPATCH=yes ./CNS11643-font.SlackBuild
+<!-- Custom font preference -->
+<alias>
+ <family>serif</family>
+ <prefer>
+ <!-- preferred serif latin font -->
+ <family>Noto Serif</family>
+ <!-- preferred serif fallback font -->
+ <family>Noto Serif CJK TC</family>
+ </prefer>
+</alias>
+<alias>
+ <family>sans-serif</family>
+ <prefer>
+ <!-- preferred sans-serif latin font -->
+ <family>Noto Sans</family>
+ <!-- preferred sans-serif fallback font -->
+ <family>Noto Sans CJK TC</family>
+ </prefer>
+</alias>
+<match target="pattern">
+ <test qual="any" name="family" compare="eq">
+ <string>monospace</string>
+ </test>
+ <!-- replace "Liberation Mono" with preferred monospace font -->
+ <edit name="family" mode="assign" binding="strong">
+ <string>Liberation Mono</string>
+ </edit>
+</match>
+<alias>
+ <!-- replace "Liberation Mono" with preferred monospace font -->
+ <family>Liberation Mono</family>
+ <prefer>
+ <!-- preferred monospace font -->
+ <family>Liberation Mono</family>
+ <!-- preferred monospace fallback font
+ (does not necessarily need to be monospace -->
+ <family>Sarasa Fixed TC</family>
+ </prefer>
+</alias>
+<alias>
+ <family>system-ui</family>
+ <prefer>
+ <!-- preferred system-ui latin font (usually sans-serif) -->
+ <family>Noto Sans</family>
+ <!-- preferred system-ui fallback font -->
+ <family>Noto Sans CJK TC</family>
+ </prefer>
+</alias>
The source file can be found at "http://data.gov.tw/node/5961", and the
license can be found at "http://www.cns11643.gov.tw/AIDB/copyright.do".