Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
What about TTFont:setSize()? — Gideros Forum

What about TTFont:setSize()?

MellsMells Guru
edited July 2013 in General questions
Hi,
TTFont.new(filename, size, text, filtering)
I'd like to know if the unability to setSize() on a Ttfont is a limitation that can't be circumvented?

And by extension :
  • setSize()
  • setText()
  • setFiltering()
twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited July 2013 Accepted Answer
    @Mells I think that internally after creating font, it gets cached, for faster rendering and reusing same font, if it was defined in the same way somewhere else in the code, etc.

    While it might be possible to provide those setters, in most cases internally it will create a new object, which should have a new instance reference then this instance. But since someone might still be using previous settings, we need both references, and in the end we don't know which reference is stored as instance in this variable.

    Well short answer most probably it is possible, but will quite complicate the code. And as we know performance and clean code freak Atilim, this most probably will not happen :)
  • @ar2rsawseen
    I see, then I'll find another way :)
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
Sign In or Register to comment.