Repository navigation
Use the font-name setting for the greeter's own labels - #294
Open
ogzhntutucu wants to merge 1 commit into
Open
ogzhntutucu wants to merge 1 commit into
ogzhntutucu wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-nameonly 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 offont-namewith the size scaled byfont-name's size relative to the defaultUbuntu 11, and uses it for every hard-coded font. Light/bold weights are kept.No change with the default settings: with
font-nameunset orUbuntu 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 withNoto Sans 11andNoto Sans 9.logo-generatoris left as is (it is a build-time tool). Related: #293 (xft-dpicould not be set fromslick-greeter.conf).Tested on Linux Mint 22.3.
🤖 Generated with Claude Code