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

Implement Universal Shaping Engine #53

Closed
devongovett opened this issue Oct 5, 2016 · 3 comments
Closed

Implement Universal Shaping Engine #53

devongovett opened this issue Oct 5, 2016 · 3 comments

Comments

@devongovett
Copy link
Member

devongovett commented Oct 5, 2016

Spec: https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm
Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-use.cc

@devongovett
Copy link
Member Author

Hacked on a state machine compiler a bit: https://github.com/devongovett/state-machine. It compiles a regular expression like syntax to a DFA. It's similar to Ragel, which Harfbuzz uses. All of the JS backends for Ragel I found produced output with a pretty large code size. The compiler I wrote produces a minimal state table which can be serialized to JSON, and has a very small runtime (< 100 lines). Not sure what to call it though: all the good names are taken in npm...

This should make it much easier to implement the syllable cluster pattens from the OT spec, rather than by hand. We should be able to use the machine from Harfbuzz (which is in turn very close to the spec) without many modifications.

@devongovett
Copy link
Member Author

Progress made: #54

@devongovett
Copy link
Member Author

Merged!

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