Thread: Z-Perl 2
View Single Post
03-03-16, 01:47 PM   #28
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Resike View Post
I don't think you have to calculate anything. If you anchor the fontstring topleft-bottomright way, then it will get resized automatically when you resize/scale the parent frame.
Then you just have to shorten fontstrings which returns true for the IsTruncated() call. You just need to avoid endless cycles.

The biggest issue that you don't really have any options which words to shorten smartly, you put the words into a table with their number of letters, and you shorten the longest/shortest/random one. Calculating stuff like letter lengths would be a waste of resources tho, like "MMM" is much wider then "III".
LOL yeah I sort of gave up recently (after writing this to you in the first place) after a long time screwing around because I started to notice it would take too much effort for too little reward. letter length is a slight issue if you start to try and get anal retentive about it. The only issue with forcing anchoring like you describe is if users then want to justify their text to the right. For now I just use some complex reg ex style pattern matching with gsub and it fakes what I want.
  Reply With Quote