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

Text misalignment when using '@' followed by a number in Inter font #781

Open
leonschwanitz opened this issue Dec 19, 2024 · 1 comment
Open

Comments

@leonschwanitz
Copy link

Describe the bug
When using the Inter font, entering an @ symbol followed by a number causes the text to shift upward. This issue was observed during login on the website https://authenticator.cursor.sh/. For example, typing test@2 triggers the problem.

To Reproduce
Steps to reproduce the behavior:

Navigate to https://authenticator.cursor.sh/.

In the login field, enter any text followed by @ and a number (e.g., test@2).

Observe the text shifting upward.

Expected behavior
The text should remain aligned consistently without any unexpected shifts, regardless of the input.

Additional context
The issue might relate to how the font handles specific character combinations. This behavior could be problematic in login forms and other input fields where such combinations are common.

@kepstin
Copy link

kepstin commented Jan 29, 2025

This behaviour is part of the calt (Contextual Alternatives) feature of Inter, which is enabled by default. It provides alternate rendering of certain glyphs based on context (i.e. depending on other characters are nearby).

The calt feature is intended for use with "script" fonts which need to replace certain character glyphs so they all join smoothly, but Inter is overloading (misusing?) the feature it to do other types of replacements.

If you are using Inter as a web font, you can use the CSS font-feature-settings: "calt" off; to disable this. (Firefox supports putting this in the @font-face rule to affect only one font, but this doesn't work in Chrome where you have to apply the property to HTML elements instead, and it will affect all fonts).

I personally think that most of the things that Inter does by default via the calt feature aren't suitable to be enabled by default for a general purpose font, but should instead be off-by-default optional features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants