feat(st): default terminal font to Fira Code size=13 scaled via Xft.dpi

This commit is contained in:
Luxferre committed 2026-11-26 15:24:35 +02:00
1 parent d351265623
commit 0d8b7994bc
30 files changed
+38 -37

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ ANODE is a lightweight, keyboard-first, cross-Unix X11 desktop environment for *
- **Patched window & core X11 stack**: - **Patched window & core X11 stack**:
- **DWM (`6.5-anode`)**: Pango/HarfBuzz status & title bar (`Fira Code` + `DejaVuSansM Nerd Font`) with a vector 3-bar launcher button (no Nerd Font icon dependency), first-class 32-bit ARGB XEmbed systray (`_NET_SYSTEM_TRAY_S<screen>`, `XEMBED_INFO` state, empty-tray unmap, `ReparentNotify` undocking, multi-monitor relocation), EWMH dock struts (`_NET_WM_WINDOW_TYPE_DOCK`, `_NET_WM_STRUT_PARTIAL`, `_NET_WORKAREA`), per-tag/grid layouts (`[]=`, `[M]`, `><>`, `###`), clickable bar regions, `Super_L` quick-tap support, `ANODE WM` EWMH identity, ICCCM `WM_S<screen>` `--replace` handoff, `SIGHUP` live restart, and `SIGUSR1`/`XA_RESOURCE_MANAGER` live theme & DPI reload with environment/cursor propagation. - **DWM (`6.5-anode`)**: Pango/HarfBuzz status & title bar (`Fira Code` + `DejaVuSansM Nerd Font`) with a vector 3-bar launcher button (no Nerd Font icon dependency), first-class 32-bit ARGB XEmbed systray (`_NET_SYSTEM_TRAY_S<screen>`, `XEMBED_INFO` state, empty-tray unmap, `ReparentNotify` undocking, multi-monitor relocation), EWMH dock struts (`_NET_WM_WINDOW_TYPE_DOCK`, `_NET_WM_STRUT_PARTIAL`, `_NET_WORKAREA`), per-tag/grid layouts (`[]=`, `[M]`, `><>`, `###`), clickable bar regions, `Super_L` quick-tap support, `ANODE WM` EWMH identity, ICCCM `WM_S<screen>` `--replace` handoff, `SIGHUP` live restart, and `SIGUSR1`/`XA_RESOURCE_MANAGER` live theme & DPI reload with environment/cursor propagation.
- **dmenu (`5.3-anode`)**: Pango/HarfBuzz rendering, fuzzy matching, touch/pointer navigation, XFixes/XI2 pointer auto-hiding, dynamic `.Xresources` & fractional scale sizing (`-l 0` full-height row fill and exact `-l N` row height), and `anode-launcher` XDG + Flatpak desktop entry integration (`--list`, symlinks, `[Desktop Action ...]` sub-entries, localization, `TryExec`, `Path=`, `Terminal=`, and `DBusActivatable=`). - **dmenu (`5.3-anode`)**: Pango/HarfBuzz rendering, fuzzy matching, touch/pointer navigation, XFixes/XI2 pointer auto-hiding, dynamic `.Xresources` & fractional scale sizing (`-l 0` full-height row fill and exact `-l N` row height), and `anode-launcher` XDG + Flatpak desktop entry integration (`--list`, symlinks, `[Desktop Action ...]` sub-entries, localization, `TryExec`, `Path=`, `Terminal=`, and `DBusActivatable=`).
- **st (`0.9.2-anode`)**: HarfBuzz programming ligatures (`Fira Code`), dirty-cell rendering cache, focus-gated cursor blink, explicit `St.font` override precedence with `~/.config/anode/Xresources.local`, live `Xft.dpi` Fontconfig resolution + `SIGUSR1` reload, and portable Linux/BSD PTY handling. - **st (`0.9.2-anode`)**: HarfBuzz programming ligatures (`Fira Code`, defaulting to `size=13` scaled via live `Xft.dpi`), dirty-cell rendering cache, focus-gated cursor blink, explicit `St.font` override precedence with `~/.config/anode/Xresources.local`, `SIGUSR1` live reload, and portable Linux/BSD PTY handling.
- **Unified `.xth` theme & fractional DPI scaling engine**: - **Unified `.xth` theme & fractional DPI scaling engine**:
- 22 normalized 96-DPI `.xth` themes (`data/themes/*.xth`) centered on `Fira Code` with ligatures. - 22 normalized 96-DPI `.xth` themes (`data/themes/*.xth`) centered on `Fira Code` with ligatures.
- `anode-apply-scale` & `anode-apply-theme` treat `scale.conf` as authoritative over stale session environment variables and synchronize `.Xresources`, `xrdb`, `dwm`, `dmenu`, `st`, `libgemui`, `anode-vkbd`, `dunst` (`scale = 1` + pixel font sizing), GTK-2, GTK-3, GTK-4 / `libadwaita` (built-in Adwaita/Default `resource:///...` inheritance with color-only overrides and dark/light auto-detection), `xsettingsd` (with discrete Xcursor size tiers), Qt5 (`qt5ct`), Qt6 (`qt6ct`), Kvantum, and Tk (`gtkTtk`) without double-scaling. - `anode-apply-scale` & `anode-apply-theme` treat `scale.conf` as authoritative over stale session environment variables and synchronize `.Xresources`, `xrdb`, `dwm`, `dmenu`, `st`, `libgemui`, `anode-vkbd`, `dunst` (`scale = 1` + pixel font sizing), GTK-2, GTK-3, GTK-4 / `libadwaita` (built-in Adwaita/Default `resource:///...` inheritance with color-only overrides and dark/light auto-detection), `xsettingsd` (with discrete Xcursor size tiers), Qt5 (`qt5ct`), Qt6 (`qt6ct`), Kvantum, and Tk (`gtkTtk`) without double-scaling.
+1 -1
View File
@@ -63,7 +63,7 @@ dmenu.selforeground: #ffffff
dmenu.outbackground: #1b2433 dmenu.outbackground: #1b2433
dmenu.outforeground: #73d0ff dmenu.outforeground: #73d0ff
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.background: #0b0e14 st.background: #0b0e14
st.foreground: #e6e1cf st.foreground: #e6e1cf
st.cursorColor: #59c2ff st.cursorColor: #59c2ff
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #7287fd
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #e6e9ef st.background: #e6e9ef
st.foreground: #4c4f69 st.foreground: #4c4f69
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #724b9e
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #181825 st.background: #181825
st.foreground: #cdd6f4 st.foreground: #cdd6f4
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #0066cc
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #000000 st.background: #000000
st.foreground: #e0f7ff st.foreground: #e0f7ff
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #1c1c1c st.background: #1c1c1c
st.foreground: #dddddd st.foreground: #dddddd
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #6272a4
dwm.selfgcolor: #f8f8f2 dwm.selfgcolor: #f8f8f2
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #21222c st.background: #21222c
st.foreground: #f8f8f2 st.foreground: #f8f8f2
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #426348
dwm.selfgcolor: #fdf6e3 dwm.selfgcolor: #fdf6e3
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #232a2e st.background: #232a2e
st.foreground: #d3c6aa st.foreground: #d3c6aa
+1 -1
View File
@@ -61,7 +61,7 @@ dwm.selbordercolor: #59c2ff
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #0f1419 st.background: #0f1419
st.foreground: #e6e1cf st.foreground: #e6e1cf
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #1f6feb
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #090c10 st.background: #090c10
st.foreground: #c9d1d9 st.foreground: #c9d1d9
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #b57614
dwm.selfgcolor: #fbf1c7 dwm.selfgcolor: #fbf1c7
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #1d2021 st.background: #1d2021
st.foreground: #ebdbb2 st.foreground: #ebdbb2
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #b57614
dwm.selfgcolor: #fbf1c7 dwm.selfgcolor: #fbf1c7
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #f2e5bc st.background: #f2e5bc
st.foreground: #3c3836 st.foreground: #3c3836
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #2d4f67
dwm.selfgcolor: #dcd7ba dwm.selfgcolor: #dcd7ba
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #16161d st.background: #16161d
st.foreground: #dcd7ba st.foreground: #dcd7ba
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #0055aa
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #000000 st.background: #000000
st.foreground: #aaaaaa st.foreground: #aaaaaa
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #e0a044
dwm.selfgcolor: #fff8dc dwm.selfgcolor: #fff8dc
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #000000 st.background: #000000
st.foreground: #efe5c0 st.foreground: #efe5c0
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #196627
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #070e08 st.background: #070e08
st.foreground: #a8ffb2 st.foreground: #a8ffb2
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #a61c52
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #1e1f1c st.background: #1e1f1c
st.foreground: #f8f8f2 st.foreground: #f8f8f2
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #5e81ac
dwm.selfgcolor: #eceff4 dwm.selfgcolor: #eceff4
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #242933 st.background: #242933
st.foreground: #e5e9f0 st.foreground: #e5e9f0
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #2c5380
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #21252b st.background: #21252b
st.foreground: #abb2bf st.foreground: #abb2bf
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #6e5694
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #1f1d2e st.background: #1f1d2e
st.foreground: #e0def4 st.foreground: #e0def4
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #268bd2
dwm.selfgcolor: #fdf6e3 dwm.selfgcolor: #fdf6e3
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #00212b st.background: #00212b
st.foreground: #93a1a1 st.foreground: #93a1a1
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #268bd2
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #fdf6e3 st.background: #fdf6e3
st.foreground: #283739 st.foreground: #283739
+1 -1
View File
@@ -64,7 +64,7 @@ dwm.selbordercolor: #3d59a1
dwm.selfgcolor: #ffffff dwm.selfgcolor: #ffffff
dwm.borderpx: 2 dwm.borderpx: 2
st.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true st.font: Fira Code:size=13:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color st.termname: xterm-256color
st.background: #16161e st.background: #16161e
st.foreground: #c0caf5 st.foreground: #c0caf5
+1 -1
View File
@@ -19,7 +19,7 @@ For a user or EDID-detected scale `S` clamped to `[0.50, 4.00]`:
- `ANODE_SCALE = S`, `theme.baseFontSize = round(15 * S)`, and discrete standard Xcursor sizes (`16`, `24`, `32`, `48`, `64` mapped from `24 * S`); `~/.config/anode/scale.conf` takes precedence over stale session environment variables during live updates, while `anode-apply-scale` and `dwm` propagate updated scaling environment variables across `X11`, `D-Bus`, and newly spawned child processes. - `ANODE_SCALE = S`, `theme.baseFontSize = round(15 * S)`, and discrete standard Xcursor sizes (`16`, `24`, `32`, `48`, `64` mapped from `24 * S`); `~/.config/anode/scale.conf` takes precedence over stale session environment variables during live updates, while `anode-apply-scale` and `dwm` propagate updated scaling environment variables across `X11`, `D-Bus`, and newly spawned child processes.
- **GTK-2 / GTK-3 / GTK-4 / xsettingsd**: `GDK_SCALE = (S < 1.75) ? 1 : round(S)`, `GDK_DPI_SCALE = 1 / GDK_SCALE`, `ADW_DISABLE_PORTAL=1`, unscaled logical UI point sizes (`round((baseFontSize / S) * 0.65)`, e.g. `10pt`) because `Xft.dpi` is active (`Xft/DPI` remains omitted from `xsettingsd.conf` to avoid double-scaling), generated `~/.themes/ANODE-<name>/gtk-{3.0,4.0}/gtk.css` themes inherit GTK's built-in Adwaita/Default stylesheets via `resource:///...` `@import` (auto-detecting dark vs light from `theme.isDark` or `theme.bgMain` luminance) with color-only overrides so native widget/menu spacing and borders stay intact, color-only `@define-color` overrides in `~/.config/gtk-{3.0,4.0}/gtk.css`, `gtk-cursor-theme-size = Xcursor.size` for GTK-2, and `Gtk/CursorThemeSize` / `gtk-cursor-theme-size = round(Xcursor.size / GDK_SCALE)` for `xsettingsd` and GTK-3/4. - **GTK-2 / GTK-3 / GTK-4 / xsettingsd**: `GDK_SCALE = (S < 1.75) ? 1 : round(S)`, `GDK_DPI_SCALE = 1 / GDK_SCALE`, `ADW_DISABLE_PORTAL=1`, unscaled logical UI point sizes (`round((baseFontSize / S) * 0.65)`, e.g. `10pt`) because `Xft.dpi` is active (`Xft/DPI` remains omitted from `xsettingsd.conf` to avoid double-scaling), generated `~/.themes/ANODE-<name>/gtk-{3.0,4.0}/gtk.css` themes inherit GTK's built-in Adwaita/Default stylesheets via `resource:///...` `@import` (auto-detecting dark vs light from `theme.isDark` or `theme.bgMain` luminance) with color-only overrides so native widget/menu spacing and borders stay intact, color-only `@define-color` overrides in `~/.config/gtk-{3.0,4.0}/gtk.css`, `gtk-cursor-theme-size = Xcursor.size` for GTK-2, and `Gtk/CursorThemeSize` / `gtk-cursor-theme-size = round(Xcursor.size / GDK_SCALE)` for `xsettingsd` and GTK-3/4.
- **Dunst notifications**: `anode-sync-dunst-theme` pins `scale = 1`, pre-scales geometry by `S`, and uses pixel font sizing (`Fira Code <baseFontSize>px`) so `Xft.dpi` never double-scales notifications. - **Dunst notifications**: `anode-sync-dunst-theme` pins `scale = 1`, pre-scales geometry by `S`, and uses pixel font sizing (`Fira Code <baseFontSize>px`) so `Xft.dpi` never double-scales notifications.
- **User `.Xresources` & terminal overrides**: `anode-apply-theme` preserves explicit `St.*` resource lines across theme switches and appends `$XDG_CONFIG_HOME/anode/Xresources.local`, while `st` honors explicit `St.font` overrides over theme-managed `st.font` and resolves `size=` fonts against live `Xft.dpi`. - **User `.Xresources` & terminal overrides**: `anode-apply-theme` sets `st.font` to `Fira Code:size=13`, preserves explicit `St.*` resource lines across theme switches, and appends `$XDG_CONFIG_HOME/anode/Xresources.local`, while `st` defaults to `Fira Code:size=13`, honors explicit `St.font` overrides over `st.font`, and resolves `size=` fonts against live `Xft.dpi`.
- **Qt5 / Qt6**: `QT_AUTO_SCREEN_SCALE_FACTOR=0`, `QT_ENABLE_HIGHDPI_SCALING=1`, `QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough`, `QT_SCALE_FACTOR=S`, `QT_FONT_DPI=96`, with logical point sizes (`10pt`) and synced palettes in both `~/.config/qt5ct/` and `~/.config/qt6ct/`. - **Qt5 / Qt6**: `QT_AUTO_SCREEN_SCALE_FACTOR=0`, `QT_ENABLE_HIGHDPI_SCALING=1`, `QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough`, `QT_SCALE_FACTOR=S`, `QT_FONT_DPI=96`, with logical point sizes (`10pt`) and synced palettes in both `~/.config/qt5ct/` and `~/.config/qt6ct/`.
- **Tk / Tkinter (`gtkTtk`)**: `*TkTheme: gtkTtk`, Tk scaling normalized against `ANODE_SCALE` / `Xft.dpi`, using `Fira Code`. - **Tk / Tkinter (`gtkTtk`)**: `*TkTheme: gtkTtk`, Tk scaling normalized against `ANODE_SCALE` / `Xft.dpi`, using `Fira Code`.
+1 -1
View File
@@ -201,7 +201,7 @@ END {
over["dwm.font"] = sprintf("%s, %s %dpx", font_face, icon_face, scaled_font_px) over["dwm.font"] = sprintf("%s, %s %dpx", font_face, icon_face, scaled_font_px)
over["dmenu.font"] = sprintf("%s, %s %dpx", font_face, icon_face, scaled_font_px) over["dmenu.font"] = sprintf("%s, %s %dpx", font_face, icon_face, scaled_font_px)
over["dmenu.lineheight"] = sprintf("%d", scaled_dm_lh) over["dmenu.lineheight"] = sprintf("%d", scaled_dm_lh)
over["st.font"] = sprintf("%s:pixelsize=%d:style=Regular:antialias=true:autohint=true", font_face, scaled_font_px) over["st.font"] = sprintf("%s:size=13:style=Regular:antialias=true:autohint=true", font_face)
for (i = 1; i <= NR; i++) { for (i = 1; i <= NR; i++) {
sline = trim(raw[i]) sline = trim(raw[i])
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/ */
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true"; static char *font = "Fira Code:size=13:style=Regular:antialias=true:autohint=true";
static int borderpx = 2; static int borderpx = 2;
/* /*
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/ */
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true"; static char *font = "Fira Code:size=13:style=Regular:antialias=true:autohint=true";
static int borderpx = 2; static int borderpx = 2;
/* /*
+4 -9
View File
@@ -2573,19 +2573,14 @@ config_init(void)
} }
} }
/* Apply Fira Code font sized for current scale unless st.font / St.font was explicitly set */ /* Apply Fira Code 13pt font (scaled via live Xft.dpi) unless st.font / St.font was explicitly set */
if (!has_font) { if (!has_font) {
const char *ff = NULL, *bsz = NULL; const char *ff = NULL;
if (db && XrmGetResource(db, "theme.fontFace", "*", &type, &ret) && ret.addr && ret.addr[0]) if (db && XrmGetResource(db, "theme.fontFace", "*", &type, &ret) && ret.addr && ret.addr[0])
ff = ret.addr; ff = ret.addr;
if (db && XrmGetResource(db, "theme.baseFontSize", "*", &type, &ret) && ret.addr && ret.addr[0])
bsz = ret.addr;
int px = bsz ? atoi(bsz) : anode_scale_px(15, scale);
if (px < 8 || px > 96)
px = anode_scale_px(15, scale);
snprintf(st_theme_font, sizeof(st_theme_font), snprintf(st_theme_font, sizeof(st_theme_font),
"%s:pixelsize=%d:style=Regular:antialias=true:autohint=true", "%s:size=13:style=Regular:antialias=true:autohint=true",
ff ? ff : "Fira Code", px); ff ? ff : "Fira Code");
font = st_theme_font; font = st_theme_font;
} }
if (db) { if (db) {
+2 -1
View File
@@ -73,7 +73,7 @@ def test_fractional_scales():
assert int(xres["theme.baseFontSize"]) == exp_px, f"scale={s_str} base={xres['theme.baseFontSize']}" assert int(xres["theme.baseFontSize"]) == exp_px, f"scale={s_str} base={xres['theme.baseFontSize']}"
assert int(xres["Xcursor.size"]) == exp_cur, f"scale={s_str} cur={xres['Xcursor.size']}" assert int(xres["Xcursor.size"]) == exp_cur, f"scale={s_str} cur={xres['Xcursor.size']}"
assert xres["theme.fontFace"] == "Fira Code" assert xres["theme.fontFace"] == "Fira Code"
assert "Fira Code" in xres["st.font"] and f"pixelsize={exp_px}" in xres["st.font"] assert "Fira Code" in xres["st.font"] and "size=13" in xres["st.font"]
assert "Fira Code" in xres["dwm.font"] and f"{exp_px}px" in xres["dwm.font"] assert "Fira Code" in xres["dwm.font"] and f"{exp_px}px" in xres["dwm.font"]
assert xres["*TkTheme"] == "gtkTtk" assert xres["*TkTheme"] == "gtkTtk"
assert xres["theme.touchMode"] == "1" assert xres["theme.touchMode"] == "1"
@@ -162,6 +162,7 @@ def test_all_22_themes_and_legacy_192dpi_import():
assert xres["Xft.dpi"] == "96" assert xres["Xft.dpi"] == "96"
assert xres["theme.baseFontSize"] == "15" assert xres["theme.baseFontSize"] == "15"
assert xres["theme.fontFace"] == "Fira Code" assert xres["theme.fontFace"] == "Fira Code"
assert "Fira Code" in xres["st.font"] and "size=13" in xres["st.font"]
assert os.path.isfile(os.path.join(tmp, ".config", "qt6ct", "colors", f"ANODE-{tname}.conf")) assert os.path.isfile(os.path.join(tmp, ".config", "qt6ct", "colors", f"ANODE-{tname}.conf"))
assert os.path.isfile(os.path.join(tmp, ".config", "qt5ct", "colors", f"ANODE-{tname}.conf")) assert os.path.isfile(os.path.join(tmp, ".config", "qt5ct", "colors", f"ANODE-{tname}.conf"))
+5
View File
@@ -465,6 +465,11 @@ def test_st_font_override_and_dunst():
return inc return inc
if shutil.which("xprop"): if shutil.which("xprop"):
inc_default = launch_st_and_get_height_inc(
"Xft.dpi: 144\n"
)
assert inc_default and inc_default >= 28, f"Expected default size=13 @ 144 DPI height_inc >= 28, got {inc_default}"
inc_small = launch_st_and_get_height_inc( inc_small = launch_st_and_get_height_inc(
"Xft.dpi: 144\nst.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true\n" "Xft.dpi: 144\nst.font: Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true\n"
) )