Font settings widget saves nonexistent font families without validation - apps silently fall back to arbitrary fonts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start with xapp/SettingsWidgets.py and inspect how FontButton binds Gtk.FontButton.font-name to GSettings; the issue reports that the chooser accepts arbitrary typed family names. Check what family validation is available through GTK, fontconfig, or Pango, and how the widget is reused by settings modules. Done means nonexistent families are refused or clearly flagged instead of being silently saved; the issue gives no test file to run.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- Cinnamon 6.6.7 on Gentoo (upstream settings UI:
cinnamon-settings-> Font Selection module) - python3-xapp 3.0.2 / xapp 3.2.2 (Python widget
xapp/SettingsWidgets.py) - GTK 3.24.52
Steps to reproduce
- Open System Settings -> Font Selection.
- On any row (e.g. "Default font"), open the font chooser, type into the Family field a family that is not installed - for example
DejaVu Sans Semi-Condensed(DejaVu Sans only ships a "Condensed" variant, not "Semi-Condensed") - and confirm. - The typed string is persisted verbatim into the gsettings key:
gsettings get org.cinnamon.desktop.interface font-name->'DejaVu Sans Semi-Condensed 11'- the same happens for
document-font-name,org.nemo.desktop fontandtitlebar-font.
Observed
- The stored family cannot be resolved by fontconfig:
fc-match "DejaVu Sans Semi-Condensed"returnsLiberationSans-Regular.ttf. - GTK applications then silently render with a different, unrelated font. Because every app/toolkit resolves the fallback differently, the UI becomes inconsistent - some parts use the intended font, others a fallback, with no error or warning shown anywhere.
Expected
- The font widget should validate the selected family against fontconfig (e.g. against the GtkFontChooser family list, or fc-list / Pango) and refuse or flag families that cannot be resolved instead of saving them.
Root cause
xapp/SettingsWidgets.py->FontButtonbindsGtk.FontButton.font-namedirectly to the gsettings key (Gio.SettingsBindFlags.DEFAULT) with no validation.GtkFontChooser's family entry also accepts arbitrary typed family names, so any typo or non-existent variant (e.g. a width such as Semi-Condensed that the family does not ship) reaches the settings keys.
Notes
- The invalid value is spread to all GTK apps at once: csd-xsettings reads
org.gnome.desktop.interface font-nameand publishes it as the XSettingsGtk/FontNamekey. - The widget is reused by many Mint settings modules, so this silent path is not specific to one app.
- A repair/warning on startup when a stored font family cannot be resolved would help users who already have such values in dconf.
- Ngôn ngữ chính
- C
- Star
- 173
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxmint/xapp
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
xapp-sn-watcher segfaults in g_dbus_proxy_get_name every time Blip (Flatpak) registers its tray iconĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Tất cả issue của linuxmint/xapp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
389ds/389-ds-base#8152 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
isolation2 lockmodes fails on cassert builds: extra AccessShareLock on partition rootCó thể đã có người làm @tuhaihe đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudberry#2356 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
windows-artifacts: the win-arm64 job uses a Visual Studio generator missing from windows-11-armĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100