Jump to content

Recommended Posts

Posted

Hey all, its been a while but I'm working on a cool new project and I am looking to scale the font with the window size in proportion to the window.

This is what i got so far and its not perfect but maximized the font is 13pt and at the smallest size of the gui its 10pt.

$fontSize = Round((@DesktopWidth+$guiSizeW)/@DesktopWidth*+6)+1

If anyone knows of something that would work better let me know please.

I'm looking for about smallest:10pt and biggest:14pt or 15pt

Thanks in Advance,

CyberZeroCool

Check out ConsultingJoe.com
Posted

Width is harder than height, because you're probably using a proportional font. The real way to go about this is by actually measuring how much pixels it takes, which can be done in a few ways, and then sizing it up or down. The cheating way is how you did it now, by approximating the width of the font.

For height it's easy. The maximum height is always non-proportional.

P.S. *+6 ?

Posted

Width is harder than height, because you're probably using a proportional font. The real way to go about this is by actually measuring how much pixels it takes, which can be done in a few ways, and then sizing it up or down. The cheating way is how you did it now, by approximating the width of the font.

For height it's easy. The maximum height is always non-proportional.

P.S. *+6 ?

That didnt help. I kinda need it to scale for height too. but it has to be in proportion to the desktop res so that its consistent across all screens.

if any one has something they've use please let me know. I'm just trying to keep the font the same size as the guictrl using GUICtrlSetResizing

Check out ConsultingJoe.com

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...