9000+ Ligatures result in subtable overflow

Hello!

I would like to create unique glyphs for every number between 0–9999.
Here’s a GIF of how the system works:
numbers_animation_1

At the moment i created the numbers with ligatures, as it seemed to be the easiest way.

sub one zero by one_zero.liga; (for the first ligature, the number 10)

sub two three five one by two_three_five_one.liga;
sub two three five seven by two_three_five_seven.liga;
sub two three five six by two_three_five_six.liga;
sub two three five three by two_three_five_three.liga;
sub two three five two by two_three_five_two.liga;
sub two three five zero by two_three_five_zero.liga;

sub nine nine nine nine by nine_nine_nine_nine.liga; (for the last ligature, the number 9999)

This all works fine, but when trying to export I get the error message
“Subtable Overflow in lookup: 0 type: (null)”

Is there a way to simplify these substitutes? Or is there a better way to solve this?

could you send me the .glyphs file?

In this case you are lucky. You can split the liga feature in two lookups. This just barely fits then.
split it like this:

lookupflag IgnoreMarks;
lookup liga1 {
sub eight eight eight eight by eight_eight_eight_eight.liga;
…
sub one zero zero zero by one_zero_zero_zero.liga;
} liga1;
lookup liga2 {
sub seven eight eight eight by seven_eight_eight_eight.liga;
…
sub two zero by two_zero.liga;
} liga1;
1 Like

Works like a charm, thank you so much.

Other question, are you sure you need ligatures for this? This looks like you could use 40 base glyphs (10 if the digit components weren’t rotated, shame) and write some OpenType code to do the positioning. That saves a ridiculous amount of file size, as well as drawing management.