mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 06:23:55 +01:00
5 lines
124 B
Plaintext
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);
|
|
} |