Skip to content

fix: More accurate approximation the font size on Windows. - #247

Merged
josueBarretogit merged 3 commits into
josueBarretogit:developfrom
Gipson62:main
Mar 22, 2026
Merged

fix: More accurate approximation the font size on Windows.#247
josueBarretogit merged 3 commits into
josueBarretogit:developfrom
Gipson62:main

Conversation

@Gipson62

@Gipson62 Gipson62 commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Here I am as promised after more than a year to try to fix #26 . It's still not perfect, but it yields a way better result. It's more accurate because I actually use a more accurate pixel width and height, and I take into account every DPI. I swapped the match to a simple calculation.

Before

image image

After

image image

It's more accurate, but I can't guarantee it to be working perfectly. Though
it does work way better than before!
@josueBarretogit
josueBarretogit changed the base branch from main to develop December 7, 2025 16:45
@josueBarretogit

Copy link
Copy Markdown
Owner

To fix the failing CI jobs do this:

  • Remove the Cargo.lock file
  • Run cargo build so that it generates the lock file
  • push the newer Cargo.lockthat was generated

@Gipson62

Gipson62 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

I can't really commit directly to this branch because of #250 It's very weird tbf

@josueBarretogit josueBarretogit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, dont pay attention to the other failing jobs xd

@Gipson62

Copy link
Copy Markdown
Contributor Author

Looks good to me to. I don't think I can add anything else to this PR. And I don't think it's really possible to do more than what I did here tbf. Windows API is way too shitty

@josueBarretogit
josueBarretogit merged commit 959a021 into josueBarretogit:develop Mar 22, 2026
3 of 5 checks passed
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.

Images aren't displayed in the correct place or at the correct size

2 participants