-
Notifications
You must be signed in to change notification settings - Fork 480
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
Handle rlig for latin script #564
base: master
Are you sure you want to change the base?
Conversation
- added GPOS LookupType 4 parser for MarkBasePosFormat1 support - added GPOS LookupType 9 parser for Extension Positioning SubtableFormat1 support - tests coverage for all supported and not supported lookups of GPOS TODO: Add a support device offsets for anchor (Parser.anchor) table format 3.
- introduced an union, ordered features lookup list - refactored the Font options features update method - supported kerning table - supported kern lookup table - supported mark to base attachments
- fix for kern sequence - tests coverage
Good question... Both of them made changes to bidi.js which I also altered, and both of them could probably benefit from the common helper function that I introduced. I think it's easier to merge those two first and have me adapt the rlig code to those changes instead of heaving to incorporate mine into both of the PRs. |
# Conflicts: # src/bidi.js # src/features/arab/arabicRequiredLigatures.js # src/features/latn/latinLigatures.js
# Conflicts: # src/font.js # test/layout.js
# Conflicts: # src/font.js
…onFormat1 - substitution algorithm to match specficiation (lookup - apply - lookup - apply) - added support for multiSubstitutionFormat1 substitutions - updated applySubstitution method for more flexibility - tests coverage
Dev/eslint import no cycle
…o next/main # Conflicts: # .github/workflows/scripts/report-counter.js # .github/workflows/unicode-report.yml
…/github.com/Adylic/opentype.js into Adylic-feature/mark-to-base-attachment-positioning # Conflicts: # src/font.js
I somehow managed to mess up this branch... Going to convert to draft until I find time to fix this. |
Description
This handles the
rlig
feature for latin scripts.Motivation and Context
Despite being enabled for latin scripts even by default,
rlig
ligatures were only handled for Arabic script.I did some minor refactoring of the ligature application to diminish code duplication betweeen arabic and latin script ligatures and the new rlig implementation. They now use the same method in a new
src/features/commonFeatureUtils.js
file, without breaking the existing file/module structure, with parameters for the script, feature and range. This might come in handy as we progress to implement new font features. Speaking of which, we should probably overhaul feature handling as we do so. This PR only enablesrlig
for the latin script, which fixes #554 (and fixes #479), while other scripts might need it as well and there are other features that might not be script-specific.How Has This Been Tested?
Tested with the Pecita font provided in #479 and added corresponding tests for it (the font is under SIL Open Font License so I was able to use it directly for the tests), not breaking any other tests.
Screenshots (if appropriate):
before:
after (note the "qu" and "ck" shapes):
The rest of the differences to how it should look according to #479 can be attributed to not supporting the
calt
feature.Types of changes
Checklist:
npm run test
and all tests passed green (including code styling checks).