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

5 lines
124 B
Plaintext

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