Java font question for FactoryPMI

I have some questions prompted from getting text to “Word Wrap” on a button in FactoryPMI. It works by typing HTML into the text input. For example, ‘My button’ will word wrap if there isn’t enough space (as opposed to drawing the "…"s).

  1. For the Horizontal Alignment property, what are Leading and Trailing as opposed to Right and Left?

  2. Would .ALIGN_JUSTIFIED achieve a word wrap? How would I set that with Jython to play with it?

  3. Are there disadvantages/reasons not to use the ‘’ prefix trick with strings? For me it works better in every way, even respecting alignment - unless I happen to want to display the literal string ‘&nbsp’ to the user :open_mouth:

  1. They have to do with languages where the text flows from right to left (known appropriately as RTL languages). So, for english, LEADING==LEFT and TRAILING==RIGHT, but for RTL, LEADING==RIGHT and TRAILING==LEFT. Using leading and trailing will make your app more RTL locale friendly.

  2. ALIGN_JUSTIFIED? Where are you getting that from?

  3. Performance. If you have a bunch of labels prefixed with when its not needed, you’ll suffer a performance hit. You’ll only notice it with hundreds of labels on the screen though…