Author Topic: text scaling Q:  (Read 96 times)

jedione

  • Hero Member
  • *****
  • Posts: 797
  • punktoe
    • View Profile
text scaling Q:
« on: November 25, 2019, 07:00:21 PM »
any one know if this is possable....

say your text is " local text = fe.add_text( "[Title]", 10, 275, 200, 400 ); "

so are with is 200,     and most of my titles fit,  but if it is long it go's out of bounds

i would like it to allways fit it to the whole thing by scaling down the charsize   

downt think it can be done....hopfully im wrong..  thanks

ps:  i dont want to "word_wrap = true;"

help a friend....

zpaolo11x

  • Hero Member
  • *****
  • Posts: 621
    • View Profile
    • My deviantart page
Re: text scaling Q:
« Reply #1 on: November 27, 2019, 10:15:04 AM »
I get your point, there's a way but it involves calculating the actual size taken by the title. In my theme I do something like that but to make things easier I use a constant spacing font, in that way it's doable

jedione

  • Hero Member
  • *****
  • Posts: 797
  • punktoe
    • View Profile
Re: text scaling Q:
« Reply #2 on: November 27, 2019, 12:00:52 PM »
if you have any time could you post a small bit of code, to show how you do it?
help a friend....