Discord
Login
Community
DARK THEME

for every character in a text the text gets smaller

I have no clue how to even go by this so can someone give me a starter?

smaller = function( str, x, y, fontSize )
  for char in str
    screen.drawText( char, x, y, fontSize, "red")
    x += screen.textWidth( char, fontSize )
    fontSize *= 0.9
  end
end

draw = function() 
  screen.clear()
  smaller(system.time().toString(), 9, 50, 50 )
end

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community