Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: scripts/check-variable-fonts.sh: Improve commands for detection

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>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/c62ba2e6-c124-4e91-8011-cb1da408a3c5@gmail.com

authored by

Akira Yokosawa and committed by
Jonathan Corbet
5384258f af3e4a5a

+6 -8
+6 -8
scripts/check-variable-fonts.sh
··· 20 20 # suggestions if variable-font files of "Noto CJK" fonts are in the list of 21 21 # fonts accessible from XeTeX. 22 22 # 23 - # Assumption: 24 - # File names are not modified from those of upstream Noto CJK fonts: 25 - # https://github.com/notofonts/noto-cjk/ 26 - # 27 23 # References: 28 24 # [1]: https://lore.kernel.org/r/8734tqsrt7.fsf@meer.lwn.net/ 29 25 # [2]: https://lore.kernel.org/r/1708585803.600323099@f111.i.mail.ru/ ··· 92 96 93 97 export XDG_CONFIG_HOME=${FONTS_CONF_DENY_VF} 94 98 95 - vffonts=`fc-list -b | grep -iE 'file: .*noto.*cjk.*-vf' | \ 96 - sed -e 's/\tfile:/ file:/' -e 's/(s)$//' | sort | uniq` 99 + notocjkvffonts=`fc-list : file family variable | \ 100 + grep 'variable=True' | \ 101 + grep -E -e 'Noto (Sans|Sans Mono|Serif) CJK' | \ 102 + sed -e 's/^/ /' -e 's/: Noto S.*$//' | sort | uniq` 97 103 98 - if [ "x$vffonts" != "x" ] ; then 104 + if [ "x$notocjkvffonts" != "x" ] ; then 99 105 echo '=============================================================================' 100 106 echo 'XeTeX is confused by "variable font" files listed below:' 101 - echo "$vffonts" 107 + echo "$notocjkvffonts" 102 108 echo 103 109 echo 'For CJK pages in PDF, they need to be hidden from XeTeX by denylisting.' 104 110 echo 'Or, CJK pages can be skipped by uninstalling texlive-xecjk.'