Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions phoenix/pico4-base/67-pico4-language-fonts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!--
The image's own Noto CJK collection carries one face per language, and fontconfig's
generic families otherwise pick the Japanese face for all of them. Steam's interface,
SteamVR's dashboard, the first-run setup and Plasma ask for sans-serif, Noto Sans,
serif or monospace; each gets its language's face here. Arabic gets Noto Sans Arabic
(Naskh) instead of the Urdu Nastaliq face that sans-serif would otherwise pick.
-->
<fontconfig>
<description>Prefer the face of the text's language in the Noto CJK and Arabic families</description>

<!-- Chinese (Simplified) -->
<match target="pattern">
<test name="lang" compare="eq"><string>zh-cn</string></test>
<test name="family" compare="eq"><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" compare="eq"><string>zh-cn</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK SC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-cn</string></test>
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Serif CJK SC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-cn</string></test>
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Mono CJK SC</string></edit>
</match>

<!-- Chinese (Traditional, Taiwan) -->
<match target="pattern">
<test name="lang" compare="eq"><string>zh-tw</string></test>
<test name="family" compare="eq"><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" compare="eq"><string>zh-tw</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK TC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-tw</string></test>
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Serif CJK TC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-tw</string></test>
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Mono CJK TC</string></edit>
</match>

<!-- Chinese (Traditional, Hong Kong) -->
<match target="pattern">
<test name="lang" compare="eq"><string>zh-hk</string></test>
<test name="family" compare="eq"><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" compare="eq"><string>zh-hk</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK HK</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-hk</string></test>
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Serif CJK HK</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>zh-hk</string></test>
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Mono CJK HK</string></edit>
</match>

<!-- Japanese -->
<match target="pattern">
<test name="lang" compare="eq"><string>ja</string></test>
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK JP</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ja</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK JP</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ja</string></test>
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Serif CJK JP</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ja</string></test>
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Mono CJK JP</string></edit>
</match>

<!-- Korean -->
<match target="pattern">
<test name="lang" compare="eq"><string>ko</string></test>
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK KR</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ko</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans CJK KR</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ko</string></test>
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Serif CJK KR</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ko</string></test>
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Mono CJK KR</string></edit>
</match>

<!-- Arabic: Naskh, not the Urdu Nastaliq face sans-serif would pick; Urdu keeps Nastaliq -->
<match target="pattern">
<test name="lang" compare="eq"><string>ar</string></test>
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Arabic</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ar</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Sans Arabic</string></edit>
</match>

<!-- Mixed-language fallback: content whose lang is the UI's (for example a Chinese game
title in an English UI) still gets a CJK or Arabic face after the Latin families.
The language rules above keep their own face first. -->
<match target="pattern">
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Sans CJK SC</string></edit>
</match>
<match target="pattern">
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Sans CJK SC</string></edit>
</match>
<match target="pattern">
<test name="family" compare="eq"><string>serif</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Serif CJK SC</string></edit>
</match>
<match target="pattern">
<test name="family" compare="eq"><string>monospace</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Sans Mono CJK SC</string></edit>
</match>
<match target="pattern">
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Sans Arabic</string></edit>
</match>
<match target="pattern">
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Sans Arabic</string></edit>
</match>

<!-- Urdu keeps Nastaliq; the appended Noto Sans Arabic is only a fallback. -->
<match target="pattern">
<test name="lang" compare="eq"><string>ur</string></test>
<test name="family" compare="eq"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Nastaliq Urdu</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="eq"><string>ur</string></test>
<test name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="family" mode="prepend" binding="strong"><string>Noto Nastaliq Urdu</string></edit>
</match>
</fontconfig>
14 changes: 10 additions & 4 deletions phoenix/pico4-base/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# system's policy files. preinit and charger mode source stage 1's lib.sh, which the image takes from stage 1.
# The preset enables the services; the tests run in the build.
pkgname=pico4-base
pkgver=2026.11.23
pkgver=2026.11.24
pkgrel=1
pkgdesc="PICO 4 system: preinit, storage and recovery policy, USB link, network, clock, firmware probes"
arch=(any)
Expand All @@ -20,7 +20,8 @@ backup=(etc/NetworkManager/conf.d/50-pico4-usb.conf
etc/sysctl.d/50-pico4-console.conf
etc/sysctl.d/50-pico4-memory.conf
etc/systemd/coredump.conf.d/50-pico4-limit.conf
etc/systemd/system/home.mount)
etc/systemd/system/home.mount
etc/fonts/conf.d/67-pico4-language-fonts.conf)
source=(50-pico4-usb.conf
50-pico4-wifi-address.conf
50-pico4-wifi-autoconnect.conf
Expand Down Expand Up @@ -76,7 +77,8 @@ source=(50-pico4-usb.conf
vrdevice_path
test_clock.py test_config.py test_qca6390.py test_usb_internet.py
test_boot_attempts.sh test_charger.sh test_steamos_readonly.sh
50-pico4-base.preset)
50-pico4-base.preset
67-pico4-language-fonts.conf)
sha256sums=('d18499e0f76dbe5a67f228a005665353eb18c1ae07ff230dbe84e7ab3b0891a1'
'a4671220f5b6aa835752b9d43439895ab33fec8cb4ef6604b7675a447ebeee70'
'7824a2b49644845d9ec8328d8a274069d83b302c2408a12d4624515aefa5077a'
Expand Down Expand Up @@ -137,7 +139,8 @@ sha256sums=('d18499e0f76dbe5a67f228a005665353eb18c1ae07ff230dbe84e7ab3b0891a1'
'773d6276040a1d5625d1e53aaaccf7ecd380e877454f657c8e293e98fb4ad905'
'51df9a5f288c1d04cc1de4973ba0a51f1745fab5af4c44f1eee6a1791dfc00af'
'a74dd6e7487fa7c16f6fc995f3ee0a9ec321fceac9f4649d2664b5ba95850201'
'fc5ed844a4a3b0e698c18331532f6686c6e766467b623890c82a7ef71fbbc0e0')
'fc5ed844a4a3b0e698c18331532f6686c6e766467b623890c82a7ef71fbbc0e0'
'6875447f1422c4567a5fefbd2d525d0c55d0617d067ffe6e4f8b40a07506843f')

build() {
python3 -B -m unittest test_clock test_config test_qca6390 test_usb_internet
Expand All @@ -156,6 +159,9 @@ package() {
install -Dm644 50-pico4-memory.conf "$pkgdir/etc/sysctl.d/50-pico4-memory.conf"
install -Dm644 50-pico4-zram.conf "$pkgdir/usr/lib/systemd/zram-generator.conf.d/50-pico4.conf"
install -Dm644 50-pico4-limit.conf "$pkgdir/etc/systemd/coredump.conf.d/50-pico4-limit.conf"
# The CJK face of the text's language, and Noto Sans Arabic, where fontconfig's generic
# families would otherwise take the Japanese and Urdu faces.
install -Dm644 67-pico4-language-fonts.conf "$pkgdir/etc/fonts/conf.d/67-pico4-language-fonts.conf"
install -Dm644 home.mount "$pkgdir/etc/systemd/system/home.mount"
install -Dm644 journald.conf.d-50-pico4.conf "$pkgdir/usr/lib/systemd/journald.conf.d/50-pico4.conf"
install -Dm644 10-pico4-wlan.link "$pkgdir/usr/lib/systemd/network/10-pico4-wlan.link"
Expand Down