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

Inter: After a serie of "@", "(", or ")" and a capital letter, the tail shifts up #7258

Closed
retueZe opened this issue Feb 6, 2024 · 5 comments

Comments

@retueZe
Copy link

retueZe commented Feb 6, 2024

Describe the bug

If you type a serie of "@", "(', or ")" (you may mix them), and a capital latin letter, the tail of the line shifts up (doesn't work with other punctuation characters or lowercase letters).

To Reproduce

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
    <style>
        textarea {
            font-family: Inter;
            font-size: 20px;
            font-weight: 400;
        }
    </style>
</head>
<body>
    <textarea></textarea>
</body>
</html>

Expected behavior

The baseline of each letter in the line should be equal.

Screenshots

image
image
image
image

Additional context

OS: Windows 10 x64
Browser: Chrome 121.0.6167.140 64-bit

@tiroj
Copy link

tiroj commented Feb 6, 2024

My guess is that Inter might be applying the OpenType Layout ‘case’ feature contextually, rather than relying on software to trigger the feature in all-caps settings. This is causing the raised glyphs for parentheses and @ symbol to be triggered in some situations where not appropriate.

@retueZe
Copy link
Author

retueZe commented Feb 8, 2024

Is there anything I can do to fix this bug besides switching the font?

@The-MAZZTer
Copy link

The-MAZZTer commented Aug 26, 2024

Easiest to see with * instead of @ ( ).

Also happens if the ending character is ?

https://fonts.google.com/specimen/Inter?preview.text=******************%3F

image

@The-MAZZTer
Copy link

The-MAZZTer commented Aug 26, 2024

Applying the following CSS works around this issue:

font-feature-settings: 'calt' 0;

image

Edit: Full disclosure, I didn't come up with this, my friend @jonathanpotts found this: toeverything/AFFiNE#4727

@davelab6
Copy link
Member

@The-MAZZTer that is what I was going to say :) I think its an upstream issue so closing here and directing your attention to rsms/inter#737

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

No branches or pull requests

4 participants