Font settings widget saves nonexistent font families without validation - apps silently fall back to arbitrary fonts
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C
- Sterne
- 173
- Forks
- 52
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus linuxmint/xapp
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
-
xapp-sn-watcher segfaults in g_dbus_proxy_get_name every time Blip (Flatpak) registers its tray iconOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
OpenPrinting/cups#1826 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Backport to 3.0 advertises a suffix that does not existEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
389ds/389-ds-base#8152 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
RetroAchievements/rcheevos#580 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
meta:feature-request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
mpv-player/mpv#18855 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag