[Text tool] Allow granular selection of font weight#1967
Open
pedropaulosuzuki wants to merge 18 commits intoPintaProject:masterfrom
Open
[Text tool] Allow granular selection of font weight#1967pedropaulosuzuki wants to merge 18 commits intoPintaProject:masterfrom
pedropaulosuzuki wants to merge 18 commits intoPintaProject:masterfrom
Conversation
Currently, it's only possible to select 'bold' or 'normal' for font-weight, even if the font-family has multiple available weights. This commit implements font-weight for [all supported weights in Pango](https://docs.gtk.org/Pango/enum.Weight.html). TODO: 1. Handle 'CTRL + B' shortcut. 1. Only show [font-weights supported by the font-family](https://docs.gtk.org/Pango/method.FontFamily.list_faces.html).
Contributor
Author
|
@cameronwhite I tried to put the font-weight value (100, 200, 300, and so on) on the ToolBarItem inside parenthesis, however it failed, probably due to the Action name being invalid. (The options were unable to be selected). We probably should fix this so that we can put any text inside any ToolBarDropDownButton's ToolBarItem. |
cameronwhite
reviewed
Feb 5, 2026
Member
cameronwhite
left a comment
There was a problem hiding this comment.
Seems good to me overall 👍
I also ran into issues with testing fonts that didn't support all of the weights, so should make sure to file a bug about this if we're leaving it for a future PR
Index 4 (book) was used in `weight_btn.SelectedIndex > 7 ? 5 : 8`, instead of correct index 5 (normal).
This was referenced Feb 10, 2026
cameronwhite
pushed a commit
that referenced
this pull request
Feb 10, 2026
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.
Currently, it's only possible to select 'bold' or 'normal' for font-weight, even if the font-family has multiple available weights. This MR fixes that by implementing font-weight for all supported weights in Pango. Ctrl+B works as expected.
Screencast.from.03-02-2026.13.30.06.webm
Partially fixes: #1965
Please squash the commits.
TODO: Only show font-weights supported by the font-family. Will keep this one for a future Merge Request.