inter icon indicating copy to clipboard operation
inter copied to clipboard

Tabular figures affect line breaking in Affinity Designer

Open apcamargo opened this issue 1 year ago • 5 comments
trafficstars

In Affinity Designer, when tabular figures are activated in frame texts the words start wrapping across lines. Inter seems to be the only font with this behavior. This did not happen with Inter v3.

Expected behavior

Lines should break at spaces, regardless of whether figures are tabular or proportional.

Screenshots

Screenshot 2023-12-23 at 15 59 34

Environment

  • OS: macOS 14.1.2
  • Affinity Designer 2.1.1
  • Inter version 4.000;git-a52131595

apcamargo avatar Dec 23 '23 19:12 apcamargo

It appears you have applied the Tabular Figures to all the text, not just the figures. In Inter v4 the tabular figures feature also includes a replacement for the space character (with space.tf which is a bit narrower). When Affinity applies the OpenType replacement, the space loses its normal line-breaking characteristics. Sometimes this makes sense. Sometimes this does not make sense. This has been discussed in the Affinity forum. For example here: Justification Not Working

Note: the replacement space is treated like any other visible text character which makes the text have no spaces, so it is effectively one long block of characters - which Affinity then breaks at odd places. Remove all spaces from your text and you will see the same thing.

The work-around is to only apply the Tabular Figures feature to figures - not all the text.

kenmcd avatar Dec 23 '23 19:12 kenmcd

That makes sense. Thanks for the clarification.

I guess this is an Affinity Designer/Publisher bug then, not Inter. What is the reason Inter uses space.tf when tabular figures are activated?

apcamargo avatar Dec 23 '23 19:12 apcamargo

What is the reason Inter uses space.tf when tabular figures are activated?

So things will line-up when using a plain space. Some fonts will only use the punctuation space (to replace comma or period) and the figure space to replace figures. Often international financial reports just use those small punctuation spaces instead of a comma or period to break for 000's. Avoids the whole commas/period vs. periods/comma issue.

This issue also arose in the Affinity forum when someone was using a font for Latin text and the font was primarily made for Arabic - and by default it had an OpenType replacement for space which was wider - which was then also treated by Affinity as a plain text character. Messed-up his Latin text.

kenmcd avatar Dec 23 '23 20:12 kenmcd

Interesting, this is much more complex than I imagined. Why does Source Sans, for instance, still keeps numbers aligned when using spaces (which, I assume, means it uses punctuation spaces) but doesn't have the same problem in affinity as Inter? Does this mean that Source Sans replaces spaces contextually while Inter replaces all spaces?

apcamargo avatar Dec 23 '23 20:12 apcamargo

Source Sans 3 (and Pro) has Tabular Figures by default. So no need to enable them in Affinity, and no different space character to deal with. They do have a figurespace of the same width. No punctuationspace but it does have a thinspace and narrownobreakspace which can also be used.

Some fonts default to Proportional Lining figures (like Inter). Some fonts default to Tabular Lining figures (like Source Sans). Some fonts default to Proportional Oldstyle figures (e.g. EB Garamond, Junicode). So depending on the default figures, a font may or may not also add a tabular figures feature.

kenmcd avatar Dec 23 '23 20:12 kenmcd

As always, thank you @kenmcd for all your help!

rsms avatar Mar 25 '24 22:03 rsms