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

volt2ttf could optimize fmt 2 pair position lookups #14

Open
bobh0303 opened this issue Mar 29, 2017 · 0 comments
Open

volt2ttf could optimize fmt 2 pair position lookups #14

bobh0303 opened this issue Mar 29, 2017 · 0 comments

Comments

@bobh0303
Copy link
Contributor

bobh0303 commented Mar 29, 2017

Consider this lookup (from Annapurna 1.100):

ADJUST_PAIR
 FIRST ENUM GLYPH "uni0940" GLYPH "uni0940093C" END_ENUM 
 FIRST ENUM GLYPH "uni0946" GLYPH "uni0946093C" END_ENUM 
 FIRST RANGE "uni0947" TO "uni0947093C.alt" 
 FIRST ENUM GLYPH "uni0948" GLYPH "uni0948093C" END_ENUM 
 FIRST ENUM GLYPH "uni0949" GLYPH "uni0949093C" END_ENUM
 SECOND GLYPH "uni0930094D.reph"
 1 1 BY POS END_POS POS DX 60 END_POS
 3 1 BY POS END_POS POS DX 60 END_POS
 4 1 BY POS END_POS POS DX 140 DY -30 END_POS
 2 1 BY POS END_POS POS DX 150 DY -50 END_POS
 5 1 BY POS END_POS POS DX -400 END_POS
END_ADJUST

When building class-based (fmt2) pair-positioning lookup, volt2ttf currently takes the simplistic approach of defining class values 1-5 for the First glyph, and class value 1 for the Second glyph. This will certainly work.

However, notice that the value record for (1,1) and (3,1) are the same (DX 6). This means that only 4 classes are needed for the First glyph rather than 5. So an optimization is possible that will make for slightly smaller lookups.

VOLT does do this optimization, so currently our fmt2 pair position lookups are not identical to VOLT's (though they function the same).

ref: FTLS-49

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

No branches or pull requests

1 participant