Pixel-Composer/scripts/string_scale/string_scale.gml

5 lines
124 B
Text
Raw Normal View History

2022-01-13 05:24:03 +01:00
function string_scale(str, w, h) {
var ww = string_width(str);
var hh = string_height(str);
return min(w / ww, h / hh);
}