GithubHelp home page GithubHelp logo

Comments (6)

HolgerGerhardt avatar HolgerGerhardt commented on June 15, 2024

An additional remark: I am not sure what motivated this design choice. Is it because some people use the hyphen as a minus sign? If so, maybe you could implement the figure-wide hyphen as a contextual alternate that is activated only if it is sandwiched by two figures or preceded by a space and followed by a figure.

from inter.

TaigaYamada avatar TaigaYamada commented on June 15, 2024

I think #227 is the context behind the design decision.

from inter.

HolgerGerhardt avatar HolgerGerhardt commented on June 15, 2024

Thanks for the pointer! The issue is that hyphen.tf has figure width, not punctuation width. The hyphen is not a minus sign—even if people often use it in that way—so I am not sure whether it should be treated as such.

As @rsms mentioned himself,

users generally enable tnum carte blanche on text,

leading to the issue that I reported.

Foreseeing this very type of “compromises in spacing,” @thomas-lowry stated

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.

from inter.

HolgerGerhardt avatar HolgerGerhardt commented on June 15, 2024

By the way, I realised that the spacing of /hyphen__ (U+2010) and /hyphennobreak (U+2011) is reduced in comparison to the spacing of /hyphen (U+002D).

Is this intended?

from inter.

rsms avatar rsms commented on June 15, 2024

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.

@HolgerGerhardt: I am not sure what motivated this design choice. Is it because some people use the hyphen as a minus sign? If so, maybe you could implement the figure-wide hyphen as a contextual alternate that is activated only if it is sandwiched by two figures or preceded by a space and followed by a figure.

Indeed this is the reason; lots of people use hyphen instead of minus. You can even see this in places where you would expect proper typography, like online bank statements. Inter is designed to work well in "the real world" and sometimes compromises like this is needed. Same goes for lots of the technical aspects. For example, the variable font uses format 1 STAT records to be compatible with Microsoft Word, even though it means not supporting advanced style linking supported by other software.

So I'd much rather have users apply tnum to ranges of numeric text and the implementation be reliable rather than supporting "apply tnum to paragraph" with potentially unexpected results.

What you're suggesting—with adding OT code to smartly insert tabular glyphs only where needed— is a good idea but is quite a bit of work, both implementation and QA. There are lots of glyphs that participate in tnum which would need inter-dependent rules. i.e. just "checking" for surrounding digits wouldn't be enough; e.g. 12.- (currency without cents in some locales) would not be correct in that case as the "wrong" hyphen would be used.

from inter.

HolgerGerhardt avatar HolgerGerhardt commented on June 15, 2024

First of all, a big thank you, @rsms, for creating—and continuously extending—this amazing typeface and making it available as an open-source font!

I fully understand the compromises involved.

  1. I understand the choice to enable proportional figures by default.
    On the one hand, this will puzzle some users—who will wonder why the numbers in a table are not aligned, why the page numbers in a table of contents are not aligned, or why the dates in a tabular CV are not aligned.
    On the other hand, it improves the aesthetic of body text.

  2. Given that proportional numbers are the default, I also understand the design choice to adjust the spacing of the hyphen (and other punctuation marks) when tabular figures are enabled.
    I still think, however, that it would be great to be able to enable/disable the adjusted spacing via a stylistic set, as you suggested yourself in #227 (comment).

  3. Given the de facto hybrid role of the hyphen-minus, why not go “all the way”? That is, why only adjust its spacing when tabular figures are enabled—why not also adjust its shape when proportional figures are enabled?
    What I have in mind is making hyphen.tf a bit wider than the default hyphen.
    Earlier versions of MATLAB included a wide hyphen that was de facto a minus sign, which makes sense given that the hyphen-minus is primarily used as a minus sign in a mathematical software package. See the axis ticks in this example plot: http://www.ece.northwestern.edu/local-apps/matlabhelp/techdoc/ref/graphiaa.gif.
    I think a wider hyphen.tf would also make sense for Inter and would make Inter, with tnum enabled, a perfect font for labelling axes in plots and for formatting numerical input and output fields that may include negative values on web pages (like in the online bank statements that you mentioned).

PS: I have seen tnum-dependent spacing once before, in Akkurat. In Akkurat, all punctuation marks, the plus sign, and also the interword space become figure-wide when tabular figures are enabled. Funnily, in Akkurat, the hyphen-minus is not affected:

Akkurat

from inter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.