The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Fix ligature preview

Changes made to libbirdfont/GlyphSequence.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/GlyphSequence.vala +++ libbirdfont/GlyphSequence.vala @@ -160,8 +160,12 @@ glyph = substitute (i + backtrack.length (), input.length (), replacement); advance = backtrack.length () + replacement.length (); - i += advance + 1; - + i += advance; + + if (replacement.length () == 0) { + i++; + } + if (advance <= 0) { warning ("No advancement."); return;