menu

Sketch

The Sketch community on Spectrum. Sketch is the ultimate tool for designing user interfaces, websites, and icons.

Channels
Team

Multiple text styling in symbol text box

August 22, 2019 at 1:39pm

Multiple text styling in symbol text box

August 22, 2019 at 1:39pm (Edited 3 weeks ago)

I have a symbol which includes a text box for figures (monetary amounts). I want the numeric characters before the decimal in one type size, and the numeric characters after the decimal in a different type size (smaller). I've set this up on the symbol but when I apply override text, the resulting type displays all in the same size in the symbol instance. Anyone found a way of solving for this without having 2 separate text boxes?

Symbol with 2 different type sizes applied to the text:

Screenshot 2019-08-22 at 14.39.46.png

Symbol instance with no override text displays correctly:

Screenshot 2019-08-22 at 14.40.29.png

Symbol instance with override text looses formatting on the smaller characters after the decimal:

Screenshot 2019-08-22 at 14.40.52.png

August 22, 2019 at 2:17pm

You must use two different text boxes. One for each size.

  • reply
  • like

If the text is right aligned. Pin the right most text box and set auto width. Then don’t pin the left most text box and put it just next to the other one. Then they will automagically adjust when you change the content.

  • reply
  • like

thanks @askenback. That's great. Have been breaking the symbols every time i needed to enter real data so you've saved me a world of pain and trouble!

like-fill
1
  • reply
  • like

you can use a space or double space, it's finicky, better use two textboxes as ^^^^

  • reply
  • like