From f1f05f0361da30823fcc4132504ce66b66fde12c Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Thu, 29 Oct 2026 20:02:55 +0100 Subject: [PATCH] feat(fonts): ship a configured default emoji font Emoji showed up as empty boxes almost everywhere: no emoji font was installed by default, and nothing told fontconfig which family to use for them, so GTK/Qt/Electron apps and the installer fell back to whatever the system had. Install Noto Color Emoji on the live image, with the desktop transaction and in the hardware base, and add a fontconfig rule that resolves the "emoji" family, appends it as a last resort for generic families without displacing the primary font, and keeps bitmap emoji enabled when a no-bitmap rule is active. The desktop font stacks (waybar, wofi, polybar) list it explicitly, and the fontconfig cache is refreshed after installation. --- README.md | 3 +- .../etc/fonts/conf.d/99-fws-emoji.conf | 48 +++++++++++++++++++ .../airootfs/usr/local/bin/fws-setup-hardware | 10 +++- .../usr/local/share/fws/polybar-config.ini | 2 + .../usr/local/share/fws/waybar-style.css | 4 +- .../usr/local/share/fws/wofi-keys.css | 4 +- .../usr/local/share/fws/wofi-style.css | 2 +- .../share/anaconda/interactive-defaults.ks | 5 +- configs/releng/packages.x86_64 | 3 ++ 9 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 configs/releng/airootfs/etc/fonts/conf.d/99-fws-emoji.conf diff --git a/README.md b/README.md index 9381d26..9deb879 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script ### À l'installation - **Choix du bureau** dans Anaconda, avec compatibilité VR affichée (i3 = SteamVR ✔ ; Hyprland = ✘) - **Page récapitulative** avant toute écriture disque : config choisie (langue, clavier, fuseau, comptes, partitionnement, bureau, nom de machine) + matériel détecté (GPU, disques, virtualisation, réseau) -- **Automatique en fin d'install** : drivers GPU (NVIDIA/AMD/Intel) + **Vulkan** (loader, `vulkaninfo`, ICD de chaque GPU détecté — portables hybrides compris — et ICD 32 bits pour Steam/Proton), outils invité VM (VMware/VirtualBox/QEMU/Hyper-V), PipeWire + pavucontrol, Bluetooth (BlueZ + blueman), luminosité (brightnessctl), **pare-feu firewalld activé**, Steam + Wine + Monado + MangoHud + gamemode, clavier/locale, hostname, sudo pour l'utilisateur créé, branding FWS +- **Automatique en fin d'install** : drivers GPU (NVIDIA/AMD/Intel) + **Vulkan** (loader, `vulkaninfo`, ICD de chaque GPU détecté — portables hybrides compris — et ICD 32 bits pour Steam/Proton), outils invité VM (VMware/VirtualBox/QEMU/Hyper-V), PipeWire + pavucontrol, Bluetooth (BlueZ + blueman), luminosité (brightnessctl), **police emoji par défaut** (Noto Color Emoji + règle fontconfig `etc/fonts/conf.d/99-fws-emoji.conf` : « emoji » résolu, emoji en dernier recours des polices génériques, bitmap autorisé), **pare-feu firewalld activé**, Steam + Wine + Monado + MangoHud + gamemode, clavier/locale, hostname, sudo pour l'utilisateur créé, branding FWS - **Bureau lancé au démarrage** : le display manager du bureau choisi (SDDM/GDM) est activé et `graphical.target` est la cible par défaut. Si l'installation des paquets du bureau échoue pendant le `%post` (réseau/miroirs), le système installé se **répare tout seul au premier démarrage** (`fws-desktop-finalize.service` → `fws-desktop-retry --auto`) : le bureau est installé puis l'écran de connexion apparaît, sans intervention ### Sur le système installé (outillage `fws-*`) @@ -267,6 +267,7 @@ L'ISO finale est générée dans `./out/FWS-YYYY.MM.DD-x86_64.iso`. - **Spokes Anaconda FWS** : `configs/baseline/airootfs/usr/lib/python3.14/site-packages/pyanaconda/ui/gui/spokes/` (`fws_desktop.py`, `fws_recap.py`, `fws_network.py` — écran « Connexion Internet » post-langue : sélecteur minimal Wi-Fi/Ethernet (plus l'UI complexe d'anaconda) + mot de passe, persistance du Wi-Fi via `%post --nochroot` ; glades dans `usr/share/anaconda/ui/spokes/` (`fws_network.glade`)) - **Configs bureaux & thèmes** : `configs/releng/airootfs/usr/local/share/fws/` (hyprland, i3, waybar, polybar, wofi, rofi, picom) et `usr/share/sddm/themes/fws/` - **Fond d'écran par défaut** : `configs/releng/airootfs/usr/local/share/fws/wallpaper.png` (PNG 2560×1440, **embarqué dans l'ISO** — rien à télécharger au premier boot) appliqué par `usr/local/bin/fws-wallpaper` : autostart XDG (`etc/xdg/autostart/`) pour KDE/GNOME/XFCE, `swaybg` pour Hyprland et `feh` pour i3 (paquets ajoutés au `%post`) +- **Police emoji par défaut** : `configs/releng/airootfs/etc/fonts/conf.d/99-fws-emoji.conf` (Noto Color Emoji, paquet `noto-fonts-emoji` : présent sur le live, ajouté à la transaction du bureau par le `%post` et à la base de `fws-setup-hardware`) — famille `emoji` résolue, emoji en dernier recours des familles génériques, `embeddedbitmap` forcé pour que les emoji bitmap ne soient jamais désactivés ; piles de polices des bureaux (waybar, wofi, polybar) complétées - **Outils fws-\*** : `configs/releng/airootfs/usr/local/bin/` - **GRUB du système installé (dualboot / bare-metal)** : `configs/releng/airootfs/etc/default/grub` (overlay : `GRUB_DISABLE_OS_PROBER=false` — sur Arch c'est `true` par défaut, d'où les « menus GRUB vides » sans Windows) ; `usr/local/bin/fws-grub-finalize` + `etc/systemd/system/fws-grub-finalize.service` (activé par le %post) : au 1er démarrage du système installé, réinstalle GRUB en `--removable` (chemin `EFI/BOOT/BOOTX64.EFI`, boote même si le firmware ASUS… oublie l'entrée NVRAM), crée/rafraîchit l'entrée NVRAM « FWS » (efibootmgr) et régénère le menu avec os-prober (Windows détecté) - **Récupération sur l'OS installé** : entrée GRUB générée par `configs/releng/airootfs/etc/grub.d/42_fws-recovery` → `fws-recovery.target` + `fws-recovery-boot.service` (`etc/systemd/system/`) ; lanceur `usr/local/share/applications/fws-recovery.desktop` + politique polkit `usr/share/polkit-1/actions/org.fws.recovery.policy` diff --git a/configs/releng/airootfs/etc/fonts/conf.d/99-fws-emoji.conf b/configs/releng/airootfs/etc/fonts/conf.d/99-fws-emoji.conf new file mode 100644 index 0000000..ae9ecde --- /dev/null +++ b/configs/releng/airootfs/etc/fonts/conf.d/99-fws-emoji.conf @@ -0,0 +1,48 @@ + + + + + + + emoji + Noto Color Emoji + + + + sans-serif + Noto Color Emoji + + + + serif + Noto Color Emoji + + + + monospace + Noto Color Emoji + + + + Noto Color Emoji + true + + + diff --git a/configs/releng/airootfs/usr/local/bin/fws-setup-hardware b/configs/releng/airootfs/usr/local/bin/fws-setup-hardware index fef4331..8307e84 100755 --- a/configs/releng/airootfs/usr/local/bin/fws-setup-hardware +++ b/configs/releng/airootfs/usr/local/bin/fws-setup-hardware @@ -13,7 +13,8 @@ # vulkaninfo et les variantes 32 bits (Steam/Proton) quand un bureau est choisi, # - les outils invité selon l'hyperviseur (VMware/VirtualBox/QEMU/Hyper-V), # - le son/micro/casque (PipeWire), le Bluetooth (BlueZ), les conteneurs -# (Podman), +# (Podman), la police emoji par défaut (Noto Color Emoji, cf. +# etc/fonts/conf.d/99-fws-emoji.conf), # - et — si un bureau est choisi — la stack « comme Windows » : Steam, Wine, # VR (Monado/OpenXR → SteamVR pour HTC Vive / Valve Index ; Oculus n'a pas # de support Linux officiel), winboat-bin (apps Windows). @@ -64,7 +65,8 @@ esac # brightnessctl : réglage de luminosité sans root (via logind) — consommé par # les touches XF86MonBrightness* et la molette du module backlight de waybar. BASE="pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber \ - pavucontrol bluez bluez-utils brightnessctl podman" + pavucontrol bluez bluez-utils brightnessctl podman \ + noto-fonts-emoji" # Gestionnaire Bluetooth graphique : KDE et GNOME ont le leur ; blueman pour # les bureaux qui n'en fournissent pas (tray + assistant d'appairage). case "$DESK" in @@ -99,6 +101,10 @@ done if [ -n "$VALID" ]; then log "installation :$VALID" pacman -S --noconfirm --needed $VALID || log "certains paquets non installés" + # polices : le cache fontconfig doit inclure la police emoji qui vient + # d'être installée, sinon les applications déjà lancées ne la voient qu'au + # prochain démarrage de session. + command -v fc-cache >/dev/null 2>&1 && fc-cache -f >/dev/null 2>&1 fi # NB : winboat-bin (AUR) n'est PAS installé ici (fws-local n'existe pas sur la diff --git a/configs/releng/airootfs/usr/local/share/fws/polybar-config.ini b/configs/releng/airootfs/usr/local/share/fws/polybar-config.ini index 8babbec..50cd2a4 100644 --- a/configs/releng/airootfs/usr/local/share/fws/polybar-config.ini +++ b/configs/releng/airootfs/usr/local/share/fws/polybar-config.ini @@ -35,6 +35,8 @@ line-size = 0 font-0 = Noto Sans:size=10;2 font-1 = Symbols Nerd Font:size=12;3 font-2 = Noto Sans:weight=bold:size=10;2 +; dernier recours = emoji (police par défaut, etc/fonts/conf.d/99-fws-emoji.conf) +font-3 = Noto Color Emoji:size=10;2 modules-left = i3 xwindow modules-center = date modules-right = updates keyhelp backlight pulseaudio network cpu memory tray power diff --git a/configs/releng/airootfs/usr/local/share/fws/waybar-style.css b/configs/releng/airootfs/usr/local/share/fws/waybar-style.css index 1037b97..b6edc5c 100644 --- a/configs/releng/airootfs/usr/local/share/fws/waybar-style.css +++ b/configs/releng/airootfs/usr/local/share/fws/waybar-style.css @@ -3,7 +3,9 @@ (paquet ttf-nerd-fonts-symbols, installé avec le bureau Hyprland). */ * { - font-family: "Noto Sans", "Symbols Nerd Font", sans-serif; + /* Noto Color Emoji : dernier recours, pour les emoji des titres/notifications + (police par défaut, cf. etc/fonts/conf.d/99-fws-emoji.conf). */ + font-family: "Noto Sans", "Symbols Nerd Font", "Noto Color Emoji", sans-serif; font-size: 13px; min-height: 0; } diff --git a/configs/releng/airootfs/usr/local/share/fws/wofi-keys.css b/configs/releng/airootfs/usr/local/share/fws/wofi-keys.css index 1765ff8..241229e 100644 --- a/configs/releng/airootfs/usr/local/share/fws/wofi-keys.css +++ b/configs/releng/airootfs/usr/local/share/fws/wofi-keys.css @@ -6,7 +6,7 @@ window { background-color: rgba(30, 30, 46, 0.97); border: 2px solid #89b4fa; border-radius: 14px; - font-family: "Noto Sans Mono", monospace; + font-family: "Noto Sans Mono", "Noto Color Emoji", monospace; font-size: 13px; } @@ -17,7 +17,7 @@ window { border-radius: 10px; margin: 12px; padding: 8px 12px; - font-family: "Noto Sans", sans-serif; + font-family: "Noto Sans", "Noto Color Emoji", sans-serif; } #input image { color: #89b4fa; } diff --git a/configs/releng/airootfs/usr/local/share/fws/wofi-style.css b/configs/releng/airootfs/usr/local/share/fws/wofi-style.css index f891383..6f26bc0 100644 --- a/configs/releng/airootfs/usr/local/share/fws/wofi-style.css +++ b/configs/releng/airootfs/usr/local/share/fws/wofi-style.css @@ -4,7 +4,7 @@ window { background-color: rgba(30, 30, 46, 0.96); /* base #1e1e2e */ border: 2px solid #89b4fa; border-radius: 14px; - font-family: "Noto Sans", sans-serif; + font-family: "Noto Sans", "Noto Color Emoji", sans-serif; font-size: 14px; } diff --git a/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks b/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks index 5927483..6034f70 100644 --- a/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks +++ b/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks @@ -344,7 +344,10 @@ esac # Navigateur de base ajouté DÈS QU'un bureau est choisi (jamais en CLI). # + python-gobject : fenêtre de bienvenue fws-hello (GTK3 vient avec Firefox) # + pacman-contrib : checkupdates/paccache (indicateur de MàJ + fws-update) -[ -n "$PKGS" ] && PKGS="$PKGS firefox python-gobject pacman-contrib" +# + noto-fonts-emoji : police emoji par défaut, dans la MÊME transaction que le +# bureau (règle fontconfig : etc/fonts/conf.d/99-fws-emoji.conf) — sans elle, +# les emoji des notifications/menus s'affichent en carrés vides. +[ -n "$PKGS" ] && PKGS="$PKGS firefox python-gobject pacman-contrib noto-fonts-emoji" if [ -n "$PKGS" ]; then pacman-key --init &>/dev/null || true pacman-key --populate archlinux &>/dev/null || true diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 21bac36..3aab3f7 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -95,6 +95,9 @@ xorg-xrandr xorg-xsetroot openbox ttf-dejavu +# Emoji de l'installateur et du live (règle fontconfig : +# etc/fonts/conf.d/99-fws-emoji.conf) — Anaconda affiche des emoji FWS. +noto-fonts-emoji # --- Agents VM (pratique pour tester l'ISO) --- qemu-guest-agent