Skip to content

Use the font-name setting for the greeter's own labels - #294

Open
ogzhntutucu wants to merge 1 commit into
linuxmint:masterfrom
ogzhntutucu:font-from-font-name
Open

ogzhntutucu wants to merge 1 commit into
linuxmint:masterfrom
ogzhntutucu:font-from-font-name

Conversation

@ogzhntutucu

@ogzhntutucu ogzhntutucu commented Oct 4, 2026 •

Copy link
Copy Markdown

The prompt box, user list, session list, buttons and shutdown dialog use hard-coded fonts (Ubuntu 13, Ubuntu 14, Ubuntu 12.5, Ubuntu Light 15, Ubuntu Light 12, Ubuntu Bold 10). font-name only reaches widgets that use the GTK default font, so with any other font the panel and the login box end up in different fonts and sizes.

This adds UGSettings.get_font (size, weight), which returns the family of font-name with the size scaled by font-name's size relative to the default Ubuntu 11, and uses it for every hard-coded font. Light/bold weights are kept.

No change with the default settings: with font-name unset or Ubuntu 11, get_font () returns exactly the previous strings and the greeter renders pixel-identical to 2.2.7 (compared under Xvfb in --test-mode).

Screenshots: font-name=Noto Sans 11, left 2.2.7, right this branch. Second: this branch with Noto Sans 11 and Noto Sans 9.

karsilastirma-font karsilastirma-boyut

logo-generator is left as is (it is a build-time tool). Related: #293 (xft-dpi could not be set from slick-greeter.conf).

Tested on Linux Mint 22.3.

🤖 Generated with Claude Code

The prompt box, user list, session list, buttons and shutdown dialog set
hard-coded fonts ("Ubuntu 13", "Ubuntu 14", "Ubuntu 12.5", "Ubuntu Light 15",
"Ubuntu Light 12", "Ubuntu Bold 10"). font-name only reached the widgets
that use the GTK default font, so with any other font the panel and the
login box used different fonts and sizes.

Add UGSettings.get_font (size, weight), which returns the family of
font-name, with the size scaled by font-name's size relative to the
default "Ubuntu 11". Use it in place of every hard-coded font.

With the default font-name the result is unchanged: get_font () returns
exactly the previous strings, and the greeter renders pixel-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant