Ligature Feature

Hi,

I want to make Hangul font with ligature. When I write almost over 3000th code, the error said
"Ligature lookup subtable in GSUB feature ‘liga’ causes offset overflow.(3071 > 3070) 12149"
I think this means in one liga feature, I can put 3070 code, so I made another liga feature, using same name. When I write code again in second liga, the error said
"GSUB feature ‘liga’ causes overflow of offset to a subtable (0x1395c 4)".
I should write code three times more than now, but I can’t update feature for this error.
What this errors mean?
And for making several liga feature, how should I do?

Thanks for reading.

you can only have one liga feature. But you can have several lookups.

wrap your code like this:

lookup Liga1 {
    #3000 lines of liga feature
} Liga1;
lookup Liga2 {
    #3000 lines of liga feature
} Liga2;

but why do you need so many ligatures?

As your advice, If I write Liga1-Liga2, I could write at least 6000 lines, but There is same error although I write 3500 lines.

I will make Hangul font that each Hangul have several ligature.
Hangul is 2350 letters, so I need many ligature as many as possible.
How many ligature limit?

Thanks for reply.

there is a practical limit as you can’t have more than 65000 Glyphs in a font. Can you post a screenshot if your ligatures? There has to be another way to do this.

Is screenshot mean this?
Thanks for helping.

this looks a bit strange. Why would someone type 뇨ㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛㅛ? And why should it be replaced by one glyph?

뇨 is made by typing ㄴ and ㅛ, 뇨ㅛㅛㅛㅛㅛㅛㅛㅛ is made by typing 뇨 long time.
I want to made changing letter by how long time pressed.
For example, when press 뇨 shortly, 뇨 is showed. And when press 뇨 long (뇨ㅛㅛㅛㅛㅛㅛ), different 뇨 will come.
I think this could be possible using ligeture, although it make font heavy.
15*2350 ligature is the maximum ligature that I need.

Why do you think that is a good idea? MacOS does not repeats the keystroke any more, neither does Indesign.
You need to reveres the lines. The long lines have to come first. Otherwise there is not base glyph and more, after the short context was applied.
I think it should be possible to compress the substitution a bit. First replace all base glyphs:

lookup Vari1 {
    sub [all glyphs that have the same last component]' uni315B uni315B uni315B uni315B uni315B by [the variants of the glyphs in the first class];
    sub [all glyphs that have the same last component]' uni315B uni315B uni315B uni315B by [the variants of the glyphs in the first class];
    sub [all glyphs that have the same last component]' uni315B uni315B uni315B by [different variants of the glyphs in the first class];
    ...
} Vair1;
lookup removeDuplicates {
    sub uni315B uni315B uni315B uni315B uni315B uni315B by uni315B;
    sub uni315B uni315B uni315B uni315B uni315B by uni315B;
    sub uni315B uni315B uni315B uni315B by uni315B;
    sub uni315B uni315B uni315B by uni315B;
    sub uni315B uni315B by uni315B;
    # do that for all duplicate glyphs.
} removeDuplicates;

this is not finished code (because it leaves one glyph of the duplicates). I didn’t try this but that should get you started.

You don’t have to do this via liga feature. Syllable construction is done by operating system and you just have to make necessary glyphs. In the line 2 of your screenshot, you sub ga-ko uni314F by ga-ko.001 ( sub 가 ㄹ by 가.001). If your ga-ko.001 is 갈, then you’re doing an unnecessary thing. In fact I think substitution of 가 ㄹ should not exist or never gets executed.