Jump to content

Maths help


.:HyPeX:.

Recommended Posts

Well if anyone gets to how do this... please tell me, i'm trying but cant find any way.

My issue:

I draw a custom font in 1.0 scale. Ok.

The custom font size is defined by a function wich scales on the screen relatives. Ok.

I've found out, the drawing quality is better if you use exact values in the end size. (Scale 1.0 and an exact value of font, like 10)

Now, how do i draw this with a default font from mta? i cannot re-create them as they're hardcoded and i dont know how to calculate correctly the size.

The main issue is, the dxDrawText wiki page does not say the font's default size they're created on.

For the sake of the test, i tried verdana, got a custom font created it and compared.

This is the list i could find:

Clear: Verdana 8pt.

default: Tahoma 8pt

(After that i assume every font is in 8pt.)

Now, if i need to make up scaling with every font to make a clear answer, how could i?

This was my example, but not a working thing that could actually be used:

  
local scale = 8 
local scaleMultiplier = 1-- Its what i get from my custom function, never fails, always gives correct multiplier. (It also gives decimals... on ~0.01 error. 
  
-- My assume was this actually... 
-- If we want to get a 12pt size we would do:  
local endScaling = 12 / 8 
local fixingScale = endScaling * scaleMultiplier -- This would be my scale in the drawing function 
local scale = fixingScale * scale -- This would be the result output visually 
-- This is a nice way and it works, but my issue is now, how do i get to always write exact font sizes? (8,9,10,11 pt) since this gives better quality. 
-- and my mind is apparently not capable of finding a work arround for this. 
  

Link to comment

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...