Posted 07 June 2015 - 12:59 AM
I've been trying to find a way to get the width (in pixels, not characters) for glasses_text objects but I can't find out how.
I've generated and looked trough the doc, searched on Google and still didn't find anything.
I know there was a function (now deprecated): glass.getStringWidth(str) but I also read that It didn't work correctly, as it assumed the font was monospace when it wasn't.
I want to know if there is any function that is hidden from the docs that can get me the width? The only solution I can think of is to manually find the width of every character, taking into account the scale property and adding up the width of every character.
Thanks for you attention.
I've generated and looked trough the doc, searched on Google and still didn't find anything.
I know there was a function (now deprecated): glass.getStringWidth(str) but I also read that It didn't work correctly, as it assumed the font was monospace when it wasn't.
I want to know if there is any function that is hidden from the docs that can get me the width? The only solution I can think of is to manually find the width of every character, taking into account the scale property and adding up the width of every character.
Thanks for you attention.