Sign in to follow this  
Followers 0
ConsultingJoe

Looking for Formula to Scale GuiFont size

3 posts in this topic

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


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



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 ?

Share this post


Link to post
Share on other sites

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


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0