i want to create a function by javascript and HTML CANVAS
Budget: $10 – $30 USD
i want to create a function by javascript and HTML CANVAS who return an array
array[0] = automatic font size.
array[1] = add new lines in my string (\n)
Exemple :
var text = 'my text example here for try the function';
var max_width = 150px;
var max_height = 100px;
function my_auto_text(text, max_width, max_height){
....
.......
............
result [0] = '23px';
result [1] = 'my text example here\n for try the function';
return result;
}
var result = my_auto_text(text, max_width, max_height);
Thank you.
array[0] = automatic font size.
array[1] = add new lines in my string (\n)
Exemple :
var text = 'my text example here for try the function';
var max_width = 150px;
var max_height = 100px;
function my_auto_text(text, max_width, max_height){
....
.......
............
result [0] = '23px';
result [1] = 'my text example here\n for try the function';
return result;
}
var result = my_auto_text(text, max_width, max_height);
Thank you.