Add CJK fonts, fontconfig priority, and locale commands
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# omarchy:summary=Check Chinese font availability and fallback correctness
|
||||
# omarchy:examples=omarchycn font status
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
failures=0
|
||||
|
||||
for family in "Noto Sans CJK SC" "Noto Serif CJK SC" "Noto Sans Mono CJK SC"; do
|
||||
matched=$(fc-match --format '%{family}' "$family")
|
||||
if [[ $matched == *"$family"* ]]; then
|
||||
echo "PASS font: $family"
|
||||
else
|
||||
echo "FAIL font: $family missing (got: $matched)"
|
||||
failures=$((failures + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
zh_sans=$(fc-match --format '%{family}' sans-serif:lang=zh-cn)
|
||||
if [[ $zh_sans == *"CJK SC"* ]]; then
|
||||
echo "PASS fallback: zh-cn sans-serif -> $zh_sans"
|
||||
else
|
||||
echo "FAIL fallback: zh-cn sans-serif -> $zh_sans (expected SC variant)"
|
||||
failures=$((failures + 1))
|
||||
fi
|
||||
|
||||
exit $((failures > 0 ? 1 : 0))
|
||||
Reference in New Issue
Block a user