Comments (8)
Yes, I looked at the code and this is treated the same as if there was an explicit "by NULL", so I think it's OK.
from afdko.
I think that syntax just amounts to an implicit "by NULL".
from afdko.
This whole scenario was encountered by a student in a FDK workshop – they reminded me of what the effect was. Basically, this substitution kills the a
in the target font (nothing else):
![image](https://private-user-images.githubusercontent.com/2049645/312612137-6be6dc9d-c147-40c9-bd23-f058572daa93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzMDcxODcsIm5iZiI6MTcxODMwNjg4NywicGF0aCI6Ii8yMDQ5NjQ1LzMxMjYxMjEzNy02YmU2ZGM5ZC1jMTQ3LTQwYzktYmQyMy1mMDU4NTcyZGFhOTMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTNUMTkyODA3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTg0ZDlmYmM5NjliNmEwMmVlYWI5NzQyODRmZTFlODRkN2RhOTgxZTA3ZmI2ZTZmOTVlMTMzMzcyNDYwODNkNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.gRsKCXDZqvs-XIiF28XVh6mxP96eRLays6b0HLa4z1E)
Still expected?
from afdko.
I guess the first question is whether putting in an explicit "by NULL" changes the outcome. If it doesn't, then it's more or less expected. If it does change the outcome then there's a discrepancy.
The other question is whether "by NULL" is implemented correctly for this case.
from afdko.
more verbose, as suggested:
sub @letters_lowercase by NULL;
same result, only a
is affected
try to affect more glyphs than the a
sub @letters_lowercase by NULL NULL;
fails
different feature tag
feature smcp {
sub @letters_lowercase;
} smcp;
no difference
different logic
@letters_lowercase = [ a b c d e f g h i j k l m n o p q r s t u v w x y z ];
@null_group = [ NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL ];
feature ccmp {
sub @letters_lowercase by @null_group;
} ccmp;
fails
deliberate
feature ccmp {
sub a by NULL;
sub b by NULL;
sub c by NULL;
sub d by NULL;
sub e by NULL;
sub f by NULL;
sub g by NULL;
sub h by NULL;
sub i by NULL;
sub j by NULL;
sub k by NULL;
sub l by NULL;
sub m by NULL;
sub n by NULL;
sub o by NULL;
sub p by NULL;
sub q by NULL;
sub r by NULL;
sub s by NULL;
sub t by NULL;
sub u by NULL;
sub v by NULL;
sub w by NULL;
sub x by NULL;
sub y by NULL;
sub z by NULL;
} ccmp;
works
sneaky NULL
@letters_lowercase = [ a b c d e f g h i j k l m n o p q r s t u v w x y z ];
@null_group = [ a b c d NULL f g h i j k l m n o p q r s t u v w x y z ];
feature ccmp {
sub @letters_lowercase by @null_group;
} ccmp;
fails
from afdko.
this is documented here: https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#5a-gsub-lookuptype-1-single-substitution
If the replacement glyph is the reserved word NULL, then the substitution has no replacement, removing the input glyph from the glyph sequence:
substitute a by NULL;
Omitting the by clause is equivalent to adding by NULL.
from afdko.
Thank you Cosimo. I guess my original question is answered there, however some of the results (only the first item of a group is replaced) are surprising.
from afdko.
however some of the results (only the first item of a group is replaced) are surprising.
Yes, this seems like it's a bug (assuming it's something we can fix, which seems likely)
from afdko.
Related Issues (20)
- [otfstemhist] cannot specify glyphs via external glyph list
- [otfstemhist] -h reports unrelated options, wrong tool name HOT 1
- Unify format of external glyph names files across AFDKO tools
- [otfautohint/otfstemhist] Add tests
- use TTX tools to compile a otf file HOT 10
- [spot] alternate metrics ignored in class kern proof
- [otfautohint] (minor) outdated tool names
- [otfautohint] points “optimized away” in flex-like scenario (print only) HOT 15
- [tx] Crashing without error when using -decid option in -t1 mode
- Reordering of ligature substitution rules is considered harmful HOT 10
- [otfautohint] Mishinting of glyph? HOT 7
- [otfautohint] Consider adding flag to selectively skip overlap processing for some glyphs
- [makeotf] silently fails when GOADB has unexpected data
- [makeinstancesufo] & [checkoutlinesufo] multiprocessing vs progress bar, output improvement
- building fails on manjaro HOT 2
- Pytest Error Encountered During AFDKO Compilation on Arch Linux HOT 6
- [checkoutlinesufo] XMLSyntaxError reading fontinfo.plist of temp UFO font HOT 3
- [makeotf] -r reports all unhinted glyphs individually HOT 1
- [buildmasterotfs] incompatible sources produced HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from afdko.