Skip to main content
Aurelien_Barbier
May 23, 2022
Question

Rules of text truncate

  • May 23, 2022
  • 15 replies
  • 19491 views

Hello !
I and my team we are searching for information about the new function to automatically truncate text. Do you know how it works ? What is the rules of truncating ? Because we made some tests and we don’t understant how it works actually 🙂

Thanks in advance,

Have a nice day ☀️

This topic has been closed for replies.

15 replies

cmkaniac
May 2, 2024

Any update on this, in plainer English than the “ICU word break rules”?

I’m working with a use case that is pretty common; i.e., I’m trying to create a simple banner notification with a title and timestamp that maintain 10 pixels of separation.

So, I have the title text set to “Hug” within an auto layout containing both text elements. This is then nested within another auto layout that controls all the banner elements. (e.g., icon, expand/collapse arrow, etc.)

Ideally, the title would ONLY be truncated when the banner width shrinks to the point that the title, timestamp, and expand/collapse arrow can no longer fit without overlapping or violating the padding rules of the auto layout. But I haven’t found a way to do this.

Setting a max-width on the title is a less-than-ideal solution, as I have to choose a narrow width that works with narrow banners. But when the banners are wider, the title text is still relatively short.

Also, it doesn’t resolve the truncation problem shared above whereby the text box extends by many spaces beyond the ellipsis.

Lukas_Low
October 18, 2024

Any updates on this? Struggling with a similar scenario in 2024 😃

Yuri_Ryzhenkov
October 20, 2024

Would also nice to add truncation positioning for long texts, where it’s important to keep visible the ending and the middle could be truncated.

mmmm
New Member
December 11, 2024

Running into this issue with two text layers that match in all settings truncating differently. One pulled from a nested instance and one as a fresh text layer, both exact same styles and width settings: one will lop off whole words while the other truncates letter-by-letter as expected.

CleanShot 2024-12-11 at 14.21.14

Ori_Solomon
New Member
May 11, 2025

I have this issue with RTL fonts the the 3 dots are overflowing the container. dose anyone encounter this issue and can help? (left, center and right alignment as well)