michal-h21 / luatex-harfbuzz-shaper

Experimental text shaping in LuaTeX using Harfbuzz library
10 stars 0 forks source link

Add support for ligature hyphenation #13

Open michal-h21 opened 8 years ago

michal-h21 commented 8 years ago

It seems that SILE shapes each word twice, first time with ligatures enabled, second time with ligatures disabled. So, more efficient way doesn't exist?

michal-h21 commented 8 years ago

I've added some code to ligature-components branch. It solves some issues, first is that kerned words haven't been hyphenated, words with ligatures weren't hyphenated as well.

Ligature detection is pretty fragile, it fails when two ligatures follows one each other, like in fiflena. fiflena is then saved as a replacement for f_i ligature. see handle_ligatures function for details, the ligature detection is based on difference between tables with ligatured and unligatured chars, it is implemented in hb_diff.lua