Repository navigation
Fix character sizing - #178
Merged
Merged
Conversation
Contributor
Author
|
As a note, vertical spacing seems to be fine for JetBrains Mono and Martian Mono so I didn't touch it. |
Contributor
Author
hyprpicker-char-sizing.mp4Video of it working with Martian Mono above, video of it working with JetBrains Mono below: hyprpicker-char-sizing.mp4 |
vaxerski
approved these changes
Oct 24, 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.
Reopening #177 .
This should fix #176 , previously the advance_x(the amount of pixels that each character takes) was hardcoded to 11.0 which I guess works for most monospace fonts, however it seems that Martian Mono Regular has a different advance_x(13.0 which is >11.0). As such, the text would go outside of the box. This change makes it so that the advance_x is obtained dynamically after the font is set instead of hardcoding 11.0. I also changed the text padding so the text is centered as previously we would pad the start by 5 px and the end by 3 px. I have tested this for both JetBrains Mono and the Martian Mono and both of them behave correctly after this fix.