Text display inconsistent wrapping

I’ve got a Text Display object inside of a matrix frame. Some text is too long for the width of the object. In the Matrix, some text items wrap correctly, and some do not. Vertical centering also seems to be incorrect for those items where the wrap is incorrect.
Screenshot 2020-05-25 23.21.19
Notice the word “MISSION” at the left wraps, but the word “WLPMini” at the right is cut off, and not vertically centered (ignore the gray box). Another example:
Here in box 48 “Counselors” wraps, but in box 7 “Northstar” does not, and again sits at the bottom, not vertically centered like the other red items. I fiddled with the settings, tried Auto Scale, but these produced the best results. I want to use word wrap, not character, and the word “Counselors” does exactly what I would expect: it defaults to Character wrap to get all the text visible. But why do other words get cut off? It seems like if a word is not in the English dictionary, it fails. The data items for boxes 4 and 5 are “Okutama SEND” and “Okutama LMJ” which both contain a space, but word wrap fails for them as well. I’m not concerned about making it perfect, but I do want to see all of each text item.

The text items are in an array called gAds (without quotation marks).
The Text Display settings are as follows:



I’m on Mac OS 10.11.6

Two thoughts:

  • Any chance that in the data is a white space character in front of the word “WLPMini” or “Northstar”?
  • You could try to make use of the option “Auto Scale Text” with an appropriate number of lines in the Text Display object’s properties to display your text without wrapping.

I’ve got my text items in another database, and my array displayed in another text object for debugging, and I don’t see any leading white spaces. And, yea, I tried playing with the Auto Scale, but couldn’t get anything better.

Another example: the text item for box 34 is “KichijojiLS” which also gets cut off instead of character wrapped.

As best as I can tell, the exact size of the Text Display box and the text involved dictates whether or not the wrapping occurs properly. You might experiment with slightly resizing the Text Display object to see if you can’t find a “one size fits all” compromise.

An additional thought is to change the Word Wrap setting to Character Wrap in the Options panel.

Yes, the size does seem critical. I haven’t found one that works correctly for all text items. Character wrap helps to see more text, but seems to cause the vertical alignment to fail with some items. Here is a sample of Align: Bottom and Character Wrap (FYI the black text is overlaid in a second text display object).

Ok, eagle-eyed KJM, you were correct! I did have space characters being added in front of my text items late in the procedure, and have corrected my code to stop that. However, that doesn’t fix the problems completely. I think the text display object just has some misbehavior for small objects, that will eventually need to be investigated, but I can get by for now.

Character Wrap and Word Wrap both look fine with Align: Top or Center, but truncate some text with Align: Bottom. (Auto scale is NOT enabled). I’l call this a BUG just in case Jim has a robot scanning the forum for that word :slight_smile:

Don’t have a robot. But I read every post. Apple’s text measuring code is finicky, especially with small objects like this. You’ll probably get different results with different fonts. As far as I know, it’s not possible to get perfect results with all fonts in all sizes, especially for super tiny rectangles like this.