inter icon indicating copy to clipboard operation
inter copied to clipboard

Additional monospaced characters when using tabular figures

Open thomas-lowry opened this issue 5 years ago • 3 comments

Description When using tabular figures, if you have additional punctuation like periods, commas, or leading spaces, the glyphs are not equal to the width of the figures which throws off alignment in tables.

This may kind of be related to Issue #217 as this also occurs across weights, but I am not sure this is as important across all 9 weights of Inter since there would presumably be compromises to spacing.

To Reproduce Steps to reproduce the behavior:

  1. Set type with tabular figures
  2. Enter additional characters or common punctuation found in tables (ex: space, comma, period)
  3. See alignment differences

Expected behavior Ideally all characters would be vertically aligned. I suspect this would be subbing in figure-width characters if part of a selection that has tnum enabled for.

Space, could be subbing in a figure space (U+2007). I am not sure of exact unicode characters for others. As an example, you can see the selection of figure-width punctuation that Hoefler includes in Decimal and also here.

Probably don't have the knowledge to attempt a PR, but would be open to attempt if still open in the future.

Screenshots Screen Shot 2020-01-11 at 12 19 08 PM

Environment

  • Mac OS 10.14
  • Figma
  • Inter 3.11

Additional context Add any other context about the problem here.

thomas-lowry avatar Jan 11 '20 17:01 thomas-lowry

This is a neat idea. I sampled a bunch of other grotesks and I have not seen this anywhere else... I wonder if it might be better for users that desire fully monospaced text to use a monospace font instead..?

Screen Shot 2020-01-14 at 10 55 14

Some day we can make a "Inter Mono”. Until then: Robot Mono, IBM Plex Mono and Inconsolata all pairs well with Inter and are good candidates for monospace text intermixed with Inter.

Alternatively we could add the proposed changes into an OT feature other than tnum, like a stylistic set. Thoughts?

rsms avatar Jan 14 '20 18:01 rsms

I did the same thing and did some search across some other grotesques as well and didn't find it as a common thing, which surprised me because it throws all the numbers out of alignment if you are actually setting up tabular numbers and use common punctuation in those numbers.

I do like the idea of a stylistic set, that way it doesn't become a default for tnum that a designer is forced to use.

thomas-lowry avatar Jan 14 '20 19:01 thomas-lowry

Just to chime in here, I think that it is fairly typical for sans-serifs to have tnum punctuation that is "multiplexed" across styles, though usually not actually monospaced. That is, if the tabular figures are all 600 units, the period.tnum might be 350 units ... but it is 350 in Hairline, Regular, Medium, ExtraBold, SemiBold Italic, etc – and also, tnum figures should have no kerning against that punctuation.

arrowtype avatar Nov 18 '21 02:11 arrowtype

@arrowtype took me a while but here we go:

inter-tnum

rsms avatar Apr 16 '23 22:04 rsms

Looks nice!

One possible downside to making the asterisk lowered like this: users may turn on tnum for a full paragraph or page of text, and then this asterisk wouldn't necessarily make sense in a proportional font. A recent time I did this was in Keynote, where numbered lists benefit from tabular leasing numbers, but where I couldn't figure out how to make only the leading numbers tabular.

arrowtype avatar Apr 17 '23 11:04 arrowtype

@arrowtype: making the asterisk lowered

This is actually a calt that is independent of tnum. I.e. there are four designs of asterisk: normal, normal-case-adjusted, tabular, tabular-case-adjusted.

Maybe I should just move the case-adjusted asterisk into case instead of having it be "smart" (calt) ..?

[edit] I've noticed other fonts adjusting asterisk with calt, for example SF Mono, screenshot of the Github comment composer:

Screen Shot 2023-04-17 at 10 58 24

rsms avatar Apr 17 '23 17:04 rsms

Please also add: punctuation space (/uni2008). It should be the same width as /comma.tf and /period.tf, etc. Sometimes users want to set the tabular numbers with just spaces - no comma or period. Can often see this in corporate annual reports, etc.

kenmcd avatar Apr 17 '23 19:04 kenmcd

Hey @kenmcd, thanks for that comment – this is just what I need to solve an issue I had created by making my normal /space multiplexed with my tnum feature. Instead, it does indeed seem that a punctuation space is the character I should use for that!

(Previously, I had made a space.tnum, thinking that it could be used in tabular data in place of periods and commas for international presentations... but the big disadvantage is that in a case like numbered lists in Keynote, the basic workspace space gets messed up.)

Also reassuring is that this character is available in the InDesign menus, so I can direct people to it in a simple way, if it comes up.

image

Here’s a handy reference for @rsms and anyone else who might want it:

https://graphicdesign.stackexchange.com/questions/54814/when-should-i-use-the-unicode-punctuation-space-character-in-french-written-text

...which leads to this PDF:

image

arrowtype avatar Apr 18 '23 01:04 arrowtype

This is actually a calt that is independent of tnum. I.e. there are four designs of asterisk: normal, normal-case-adjusted, tabular, tabular-case-adjusted.

Ah, my bad. Well, if it only happens between numbers, that seems fine. calt is also generally easy enough to turn off (or unfortunately, it’s often a bit hard to turn on!)

arrowtype avatar Apr 18 '23 01:04 arrowtype

Please also add: punctuation space (/uni2008). It should be the same width as /comma.tf and /period.tf, etc. Sometimes users want to set the tabular numbers with just spaces - no comma or period. Can often see this in corporate annual reports, etc.

/punctuationspace is already there, mapped to U+2008. But I think what you mean is to add a tnum variant with width matching that of /period.tf et al — good idea! Will do.

rsms avatar Apr 18 '23 22:04 rsms

Added.

Current state of tnum:

  • spacespace.tf: punctuation width
  • punctuationspacepunctuationspace.tf: punctuation width
  • figurespace: full width

rsms avatar Apr 19 '23 01:04 rsms

The addition of the figure space really helped my team out recently, so thank you very much for that!

I'm curious about more potential tabular figures: hexadecimal digits.

  1. Would that even be reasonable?
  2. Is there some other approach we could/should take for that? Since there is no monospaced variant of the font, we've resorted to using Roboto Mono. It works OK, but for reasons I won't bore anyone with, it looks really strange at times too (at least in our application).

Any thoughts would be appreciated!

mtrewartha avatar Sep 27 '23 03:09 mtrewartha

Re hexadecimal digits: I don't think that would work easily, at least it wouldn't be practical as a tnum feature, since users generally enable tnum carte blanche on text, which would cause some letters like A, B and c to appear "broken" compared to other letters.

In the scenario of displaying hexadecimal monospaced data (or data of any base greater than 10 that needs to line up on columns) I recommend using a monospace font instead of Inter. There are many good ones, like Recursive Mono and JetBrains Mono.

I maintain a small sample comparison of Inter & Monospaced fonts here: Inter.mono.pairings.pdf

rsms avatar Sep 27 '23 16:09 rsms

Re hexadecimal digits: I don't think that would work easily, at least it wouldn't be practical as a tnum feature, since users generally enable tnum carte blanche on text, which would cause some letters like A, B and c to appear "broken" compared to other letters.

I wasn't sure how people generally used font "features" as the concept is pretty new to me, but agreed, I can now see the hexadecimal digits doing more harm than good.

In the scenario of displaying hexadecimal monospaced data (or data of any base greater than 10 that needs to line up on columns) I recommend using a monospace font instead of Inter. There are many good ones, like Recursive Mono and JetBrains Mono.

I maintain a small sample comparison of Inter & Monospaced fonts here: Inter mono pairings.pdf

Bummer, but that works for us for now. Thanks for the PDF link, the figure space addition, and the great font!

mtrewartha avatar Sep 27 '23 16:09 mtrewartha

I sampled a bunch of other grotesks and I have not seen this anywhere else...

Akkurat has a feature like this, see

https://lineto.com/typefaces/akkurat/trial?font=aiPYDaTpHRi&text=Tabular-figure-adjusted+spacing+of+punctuation%0A01-23+45.67,89%0A01-23+45%2B67,89%0A01%2B23+45*67/89&features=tnum_1

and

https://lineto.com/typefaces/akkurat/trial?font=aiPYDaTpHRi&text=Tabular-figure-adjusted+spacing+of+punctuation%0A01%E2%88%9223+45.67,89%0A01023+45%2B67,89%0A01*23+45×67÷89&features=tnum_1

It is, however, not as extensive as in Inter v4.0.

HolgerGerhardt avatar Nov 30 '23 11:11 HolgerGerhardt

@arrowtype took me a while but here we go:

inter-tnum

Given that the spacing of the asterisk is adjusted (as it is often used to indicate multiplication), shouldn’t the spacing of the forward slash/solidus (as it is frequently used to indicate division) also be adjusted to match the width of the plus sign, asterisk, etc.?

HolgerGerhardt avatar Nov 30 '23 11:11 HolgerGerhardt

Good question! Maaaaybe. But, I think that would be really wide for a slash. Often, it is closer to the proportions of the parentheses and braces. So, it would really stand out if it were made fully tabular, which could be a problem if someone set tnum on a full page of text.

At a certain point, if you want monospaced glyphs for math, etc, it might just be worthwhile to use a monospaced font.

I could definitely see the value in making it a consistent width across styles, though, sort of like tabular commas, etc.

arrowtype avatar Nov 30 '23 12:11 arrowtype

But, I think that would be really wide for a slash. ... So, it would really stand out if it were made fully tabular, which could be a problem if someone set tnum on a full page of text.

Yes, I am aware of this type of trade-off—and so is @rsms, see his reply at https://github.com/rsms/inter/issues/647#issuecomment-1828582609:

This is indeed by design. tnum should be enabled only for text ranges that are actual numeric values & punctuation, not for entire paragraphs of text.

Under this premise, the figure-wide hyphen (hyphen.tf) is enabled in Inter v4 when tabular figures are enabled. Given this feature, I think it would make sense to also make the slash figure-wide.

HolgerGerhardt avatar Nov 30 '23 14:11 HolgerGerhardt