-
Notifications
You must be signed in to change notification settings - Fork 168
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
Things fea can't do: delete a glyph #1234
Comments
A possible syntax might be |
In the workshop I suggested |
That was the first to come on my mind, but it feels like a typo. |
yes, that looks like a typo to me, I prefer Khaled's proposal to use |
Ok, I’ll work on a patch. |
Has anyone proposed a spec change for this yet? It would be nice to have the spec reflect reality and avoid having to explain why AFDKO supports something that is expressly prohibited (even if it is widely supported in implementations). |
This proposal will break every tool that parses |
@mbutterick No. It will mean old tooling that doesn't get updated won't be interoperable with tooling that does on projects that use this as a feature. It won't automatically break old tools across the board or even reduce interoperability with new tools that don't happen to use the new feature. |
This comment has been minimized.
This comment has been minimized.
This is my last comment. Your point is true in the sense of concrete instances. But it is not true in the sense of abstract implementations, which is how tools interoperate. As a software author, I read a specification not just to learn what can happen but also what can never happen (and write tests accordingly). This is why, say, Unified Font Object is versioned: so that tool authors can make stable claims about their code. |
The AFDKO spec is also versioned. |
Deleting a glyph sounds like the kind of thing that one would want to happen in a certain context. This case is supported. |
Interestingly, the feature grammar already provided explicitly for "sub X by NULL;", creating a substitution lookup with null replacement. I've just added a little bit of logic to make that pass validation and emit a font. I'm going to leave it there for now to see what we think about |
|
Ignore me, there is no change to the grammar whatsoever so there are no breaking changes here. |
Yeah, NULL is marked as a keyword and the grammar has actually accepted it in substitution rules since forever. |
Looks like this has been proposed at MicrosoftDocs/typography-issues#673, thanks @simoncozens for continuing this effort! |
Bump. We're waiting a decision on this: |
How about something like |
Definitely not NUL or NIL as they could be glyph names; I quite like But really, “by NULL” already has syntax so we could just assign that syntax the obvious semantics... |
But |
I'm totally fine with |
Yeah, I mean NULL is already a special case in the grammar. Anyhow PR #1251 should do the job. |
The spec need to mention this somewhere as well. |
Yes, working on spec change and fontTools implementation now. |
In my workshop I've been telling people "You can't delete a glyph using a substitution rule". The OT spec says as much: "A Multiple Substitution (MultipleSubst) subtable replaces a single glyph with more than one glyph". But... you can, Uniscribe, Harfbuzz and CoreText all support it, and Arial Unicode relies on the fact in its Devanagari implementation.
So it would be nice if there were syntax for it.
The text was updated successfully, but these errors were encountered: