From: Akira Yokosawa <akiyks@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH] docs: scripts/check-variable-fonts.sh: Improve commands for detection
Date: Sat, 27 Apr 2024 17:24:11 +0900 [thread overview]
Message-ID: <c62ba2e6-c124-4e91-8011-cb1da408a3c5@gmail.com> (raw)
As mentioned in "Assumption:", current grep expression can't catch
font files whose names are changed from upstream "Noto CJK fonts".
To avoid false negatives, use command of the form:
fc-list : file family variable
, where ":" works as a wildcard pattern.
Variable fonts can be detected by filtering the output with
"variable=True" and "Noto CJK" font-family variants.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
scripts/check-variable-fonts.sh | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/scripts/check-variable-fonts.sh b/scripts/check-variable-fonts.sh
index 12765e54e4f3..ce63f0acea5f 100755
--- a/scripts/check-variable-fonts.sh
+++ b/scripts/check-variable-fonts.sh
@@ -20,10 +20,6 @@
# suggestions if variable-font files of "Noto CJK" fonts are in the list of
# fonts accessible from XeTeX.
#
-# Assumption:
-# File names are not modified from those of upstream Noto CJK fonts:
-# https://github.com/notofonts/noto-cjk/
-#
# References:
# [1]: https://lore.kernel.org/r/8734tqsrt7.fsf@meer.lwn.net/
# [2]: https://lore.kernel.org/r/1708585803.600323099@f111.i.mail.ru/
@@ -96,13 +92,15 @@
export XDG_CONFIG_HOME=${FONTS_CONF_DENY_VF}
-vffonts=`fc-list -b | grep -iE 'file: .*noto.*cjk.*-vf' | \
- sed -e 's/\tfile:/ file:/' -e 's/(s)$//' | sort | uniq`
+notocjkvffonts=`fc-list : file family variable | \
+ grep 'variable=True' | \
+ grep -E -e 'Noto (Sans|Sans Mono|Serif) CJK' | \
+ sed -e 's/^/ /' -e 's/: Noto S.*$//' | sort | uniq`
-if [ "x$vffonts" != "x" ] ; then
+if [ "x$notocjkvffonts" != "x" ] ; then
echo '============================================================================='
echo 'XeTeX is confused by "variable font" files listed below:'
- echo "$vffonts"
+ echo "$notocjkvffonts"
echo
echo 'For CJK pages in PDF, they need to be hidden from XeTeX by denylisting.'
echo 'Or, CJK pages can be skipped by uninstalling texlive-xecjk.'
base-commit: fcb5bcefdbfbd939bf4edfa71182df0b56d20a49
--
2.34.1
next reply other threads:[~2024-04-27 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-27 8:24 Akira Yokosawa [this message]
2024-05-02 16:15 ` [PATCH] docs: scripts/check-variable-fonts.sh: Improve commands for detection Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c62ba2e6-c124-4e91-8011-cb1da408a3c5@gmail.com \
--to=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.