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

"After a series of "@", "(", or ")" and a capital letter, the tail shifts up" #737

Open
davelab6 opened this issue Aug 28, 2024 · 1 comment
Labels
help wanted technical About a technical aspect like font file format details

Comments

@davelab6
Copy link
Contributor

Did you get the font from Google Fonts? Then please head over to
https://github.com/google/fonts/issues
and file an issue with Google Fonts.
If not, REMOVE THIS PARAGRAPH BEFORE FILING YOUR ISSUE.

Well, I am coming from Google Fonts with google/fonts#7258 to say this is probably an upstream issue ;)

Describe the bug

"After a series of "@", "(", or ")" and a capital letter, the tail shifts up"

To Reproduce
Type **************?

Expected behavior
Case feature works more as expected

Screenshots
See GF issue

@rsms
Copy link
Owner

rsms commented Nov 15, 2024

Although not great, this is the expected behavior and technically not a bug.

Screen Shot 2024-11-15 at 14 45 20

This happens because calt substitution can only cause an infinite forward cascade, but requires explicit substitution for back-propagation.

Inter has rules for up to 5 backwards substitutions:

inter/src/features/calt.fea

Lines 267 to 271 in 4f3d79f

sub @CASE_L' @UC by @CASE_R;
sub @CASE_L' @CASE_L @UC by @CASE_R;
sub @CASE_L' @CASE_L @CASE_L @UC by @CASE_R;
sub @CASE_L' @CASE_L @CASE_L @CASE_L @UC by @CASE_R;
sub @CASE_L' @CASE_L @CASE_L @CASE_L @CASE_L @UC by @CASE_R;

That's why ?***... works for any number of * but ...***? only works for up to 5 *.

There might be a way to "program" calt/OT substitution to propagate backwards that I'm not aware of and I'd be happy to update Inter to take advantage of such a technique if it exist.

If not, all we can do is to introduce more explicit backtracking rules or add substitution exceptions to suppress certain scenarios of "automatic case matching" behavior

@rsms rsms added help wanted technical About a technical aspect like font file format details labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted technical About a technical aspect like font file format details
Projects
None yet
Development

No branches or pull requests

2 participants