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

Could not encode tables #4

Open
simoncozens opened this issue Apr 28, 2021 · 2 comments
Open

Could not encode tables #4

simoncozens opened this issue Apr 28, 2021 · 2 comments

Comments

@simoncozens
Copy link

I'm getting this with any input:

thread 'main' panicked at 'Could not encode tables: TagNotInFeatureList("LangSys.features", FeatureTag("ccmp"))',

Here's the client code:

        let res = otf_fea_rs::parser::parse_file(
            File::open(feature_path).expect("Couldn't open feature file"),
        )
        .expect("Couldn't parse feature file");
        let glyphorder = name_to_id
            .iter()
            .map(|(name, id)| (*id as u16, GlyphRef::from_name(name)))
            .collect_into_glyph_order()
            .unwrap();
        let compiled = compiler::compile(glyphorder, &res).expect("Could not compile features");
        let tables = compiled.encode_tables().expect("Could not encode tables");
@simoncozens
Copy link
Author

Note that this also happens with the example script compile.rs:

simon@Simons-iMac ~/others-repos/otf-fea-rs *$ echo 'feature liga { sub f i by f
_i; } liga;' > foo.fea
simon@Simons-iMac ~/others-repos/otf-fea-rs *$ ./target/debug/compile foo.fea IBMPlexSans-Regular.ttf

parsing...
    parsed successfully!

compiling...
feature liga:
    compiled successfully!

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: TagNotInFeatureList("LangSys.features", FeatureTag("liga"))', src/bin/compile.rs:89:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@simoncozens
Copy link
Author

Oh, I think I get this now. I've been unlucky because I have tried examples which have ligature substitutions and single substitutions, neither of which this currently supports. So this is just incompleteness rather than incorrectness.

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

No branches or pull requests

1 participant