Closed neuronix closed 7 years ago
Actually, the original idea was to simplify the life of the developer writing a custom compositor; that he wouldn't need to care about "autoSize", but have that handled by the TextField itself.
But I already saw this idea fail when it came to HTML fonts, which can be aligned on both sides (and thus, crippling any post-autosize logic).
I guess you ran into something similar?
My initial implementation of TLFCompositor used TLFTextField which renders beautifully but is horribly slow (especially when using autoScale extensively). So I made a new version based on the old TLFSprite extension but it requires a few extra adjustments and workarounds.
I see, thanks for the additional information! I'll look into it. 👍
That should do it! Please let me know if that works for you.
Looks great, thanks Daniel! :)
Custom TextCompositors may require knowing if the textfield has autoSize enabled. One can cheat and look at height == 10000 but that's dirty.
TextOptions seems to have been made for this, so autoSize should be added to the list of values.
Thanks Daniel!