The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix ligature preview

These changes was commited to the Birdfont repository Fri, 11 Aug 2017 22:37:16 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 11 Aug 2017 22:37:16 +0000 (00:37 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 11 Aug 2017 22:45:11 +0000 (00:45 +0200)
commit b3936d2662cd4654c88becc7cff99175a0ca107b
tree fb43021ad7e513472a2d4f7648f73491dc97cc9e
parent 782fdf88ace513dcac98f02194c341d8d6bdb105
Fix ligature preview
Fixes bug 51

libbirdfont/GlyphSequence.vala
--- a/libbirdfont/GlyphSequence.vala +++ b/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;