Skip to content

Create fonts before sourcing theme scripts#167

Open
rugudu wants to merge 1 commit intordbende:mainfrom
rugudu:bugfix/font-creation-order
Open

Create fonts before sourcing theme scripts#167
rugudu wants to merge 1 commit intordbende:mainfrom
rugudu:bugfix/font-creation-order

Conversation

@rugudu
Copy link
Copy Markdown

@rugudu rugudu commented Feb 11, 2026

Move the font create block above the source statements in sv.tcl. This reorders initialization to ensure proper named font binding.

Move the `font create` block above the `source` statements in `sv.tcl`.
This reorders initialization to ensure proper named font binding.
@rugudu
Copy link
Copy Markdown
Author

rugudu commented Feb 11, 2026

In my case, a corresponding issue surfaced with the Treeview style, which uses the linespace of SunValleyBodyFont to determine rowheight and is unable to do so with the current ordering. I had not noticed this previously; the issue appeared when using libtk 9.0, which is relatively recent.

Since creating the fonts before sourcing the scripts is the correct order IMHO, and the fix appears to be pretty low risk, I did not verify the behavior with older Tk versions.

@deajan
Copy link
Copy Markdown

deajan commented Mar 24, 2026

@rugudu The same happens to me, Treeview has a different linespace depending on dark/light theme.
Reordering font inclusion seems to fix part of the problem, but not all.

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.

2 participants