John Smith Posted March 7, 2015 Share Posted March 7, 2015 hi i am using dx functions as almost every scripter and i ran into a problem due to scale(i guess) on lower resolutions quality of font is being lost i'm scaling font like this sw,sh = guiGetScreenSize() local scaleX,scaleY = 1/1920*sw, 1/1080*sh dxDrawText(...,scaleX,scaleY,...) and basically on my resolution (1920x1080) font is basically in HD, while on lower resolutions such as 1366x768 quality is completely ruined. how can i fix this problem? Link to comment
Enargy, Posted March 7, 2015 Share Posted March 7, 2015 Maybe if you increase the font size could found (it helped me); local sw,sh = guiGetScreenSize() scaleX,scaleY = 1/1920*sw, 1/1080*sh size = 1.50*scaleY Link to comment
John Smith Posted March 7, 2015 Author Share Posted March 7, 2015 that will just increase font size, and for me it would bug out with the thing im working with(because font size would be too big) ... Link to comment
Olle Risk Posted March 7, 2015 Share Posted March 7, 2015 That's an issue with the way you are scaling in, what you want is a constant font size but also a solution to the problem with different screen resolutions. Try some kind of docking mechanism like making the dx text 800 pixels wide and dock it at center bottom, that would work on all resolutions. Link to comment
arezu Posted March 7, 2015 Share Posted March 7, 2015 Try creating a custom font of several sizes and switch between the fonts depending on the size. Link to comment
Gallardo9944 Posted March 8, 2015 Share Posted March 8, 2015 You can math.ceil or math.floor (or math.round if you make it) your font scale so it doesn't look that bad. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now