-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
ClearType rendering issue with transformed components (was "Braces are asymmetric for some font sizes") #251
Comments
Interesting. This seems to be a Windows-specific issue as I an unable to reproduce in Chrome, Safari or Firefox on mac. I will check on my Windows computer as well, but in the meantime, would you mind trying the following things?
|
I get the same issue on :
|
@rsms Should be another issue related with transformed component references. This is how GID 1331 shown in VTT: @schriftgestalt is it possible to tell Glyphs not to use transformed components? Font tools really really dislike that. Glyphs could unlink a component if it is trasnformed. |
The experienced the same issue on Sketch (MacOS Catalina). It seems to have to do with the calt (Contextual Alternates feature. It works on capital letters only after letter, but not before it. So the left brace gets positioned wrongly (no reposition), and the right one correctly (reposition). In Chrome on the other hand braces are positioned correctly. –––– Turns out that the left bracket repositions like follows: –> When at least 4 characters are entered using mixed small and capital letters, the brackets behave as expected. |
Sorry for taking so long. Flipped or rotated components are decomposed by default. |
@schriftgestalt It looks like Inter used its own script to generate TTF from Glyphs source 🤦. Time to fix that. |
Indeed this looks like an issue with intended behavior with unexpected results — i.e. not a bug but also not ideal. Inter uses an OpenType feature called "contextual alternates" which is used to replace certain glyphs in certain contexts with specialized glyphs. For example, Inter provides a left parenthesis specialized for capital letters. When a left parenthesis is adjacent to a capital letter, it is replaced by the special one. However, the rules are more complex that this and includes exceptions, which is what causes the issue you see. Specifically, "x (M" vs "(M" — in the first case the adjacent lower-case letter "x" invokes an exception to not perform the substitution. |
I made some improvements in ebdfaf2 Here is the result of |
Some improvements to this has been released as part of version 3.14 |
I'm sorry, but I can't see any improvements. I can see that the braces are rendered differently if there's an adjacent capital letter (they go up a little), but the opening and closing brace still have different lifting, which, on my screen, differs from what I see on your screenshot. Here're the current results from https://rsms.me/inter/lab/?antialias=default&size=16 (which, I believe, has been updated to use 3.14 already? By the way, could we have a font version being printed on the website?) And, for comparison, with space or a non-capital letter before and of the braces: (they're drawn lower, but opening and closing brace are still noticeably different) |
Interesting! So perhaps this is Windows-specific after all. I’ll test on a Windows machine... |
@rsms You can try with Visual TrueType, select the glyphs, select an anti-aliasing mode (TTFA should using "CT(anti-aliased)"), enable grid fitting ( |
Thanks! I'll try that. |
This issue may also influence certain Linux users (depending their |
I've spend a good deal of time this evening trying to reproduce the issue but I'm falling flat. I've tried all major browser, macOS and Windows 10 as well as following @be5invis's advice with Visual TrueType. The results I'm seeing are the expected ones (i.e. "()" are aligned and not offset.) Is there any details we might be missing here? How I'm testing:
sample:
Note that Some screenshots of what I'm seeing: Visual TrueType, setup as suggested in #251 (comment) |
@rsms You could try using ↑ or ↓ to increase or decrease PPEM in VTT. This issue only occurs at certain PPEM sizes. |
Hm. I'm not seeing any changes to positioning of left and right parenthesis across sizes. Perhaps the component transformation (right parenthesis is a component instance) gets messed up somehow on Windows. Tomorrow I'll try to decompose everything in the font (which will explore the file size but allow me to test this theory.) If this is the case, with component transformation issues on Windows, then perhaps I could offer a decomposed and larger font for Windows specifically. |
@rsms It is a feature: you are using rounded component references in |
@rsms Could you press |
You can skip all tests on MacOS as it ignores TrueType instructions. |
@be5invis This is what the CTRL+2 shows me for the glyph program |
Repro on Windows with ClearType enabled: (or Linux with ClearType or similar technology enabled in e.g. FreeType)
This should yield right parenthesis with an unwanted offset on the y axis, as shown in this screenshot: Repro on Windows in a web browser (for some reason this is not reliable for me; sometimes it repros sometimes not. Very strange.) |
Here's a new build of the fonts, incorporating the changes landed in 7d70535 This is what it looks like on Windows 10 in Notepad: This is what is looks like on the website in Windows 10: (left is static font, right is variable) |
@ForNeVeR @aemi-dev Would you mind installing the fonts in the zip attached in the previous comment above and let me know if that solves the issue for you? |
Excellent news. Thank you @aemi-dev! |
This has now been released as part of version 3.15 🎉 |
Thanks a lot for your work on figuring our the issue and fixing it! I confirm that it has been resolved completely. |
For some font sizes (e.g. 16px) braces (
[](){}
) look asymmetric, the right one may be drawn lower or higher than the left one.For example, visit this link: https://rsms.me/inter/lab/?size=16&antialias=default and enter braces into the first text line:
Expected behavior
Braces should be symmetric and have the same height/position for all font sizes.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: