Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional monospaced characters when using tabular figures #227

Closed
thomas-lowry opened this issue Jan 11, 2020 · 18 comments
Closed

Additional monospaced characters when using tabular figures #227

thomas-lowry opened this issue Jan 11, 2020 · 18 comments
Labels
Add Enhancement, Improvement, addition or new feature design

Comments

@thomas-lowry
Copy link

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.

@rsms rsms added Add Enhancement, Improvement, addition or new feature design labels Jan 14, 2020
@rsms
Copy link
Owner

rsms commented Jan 14, 2020

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?

@thomas-lowry
Copy link
Author

thomas-lowry commented Jan 14, 2020 via email

@arrowtype
Copy link

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.

@rsms
Copy link
Owner

rsms commented Apr 16, 2023

@arrowtype took me a while but here we go:

inter-tnum

@arrowtype
Copy link

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.

@rsms
Copy link
Owner

rsms commented Apr 17, 2023

@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

@kenmcd
Copy link

kenmcd commented Apr 17, 2023

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.

@arrowtype
Copy link

arrowtype commented Apr 18, 2023

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
Copy link

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!)

@rsms
Copy link
Owner

rsms commented Apr 18, 2023

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 added a commit that referenced this issue Apr 19, 2023
@rsms
Copy link
Owner

rsms commented Apr 19, 2023

Added.

Current state of tnum:

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

@mtrewartha
Copy link

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!

@rsms
Copy link
Owner

rsms commented Sep 27, 2023

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 rsms closed this as completed Sep 27, 2023
@mtrewartha
Copy link

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!

@HolgerGerhardt
Copy link

HolgerGerhardt commented Nov 30, 2023

@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.?

@arrowtype
Copy link

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.

@HolgerGerhardt
Copy link

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 #647 (comment):

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Enhancement, Improvement, addition or new feature design
Projects
None yet
Development

No branches or pull requests

6 participants