Pixel-Composer/scripts/string_scale/string_scale.gml
2022-01-13 11:24:03 +07:00

5 lines
No EOL
124 B
Text

function string_scale(str, w, h) {
var ww = string_width(str);
var hh = string_height(str);
return min(w / ww, h / hh);
}