The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix stylistic alternatives

These changes was commited to the Birdfont repository Sun, 27 Sep 2015 17:36:47 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 27 Sep 2015 17:36:47 +0000]

Updated Files

libbirdfont/OpenFontFormat/AlternateFeature.vala
--- a/libbirdfont/OpenFontFormat/AlternateFeature.vala +++ b/libbirdfont/OpenFontFormat/AlternateFeature.vala @@ -48,18 +48,19 @@ // number of alternate sets fd.add_ushort ((uint16) font.alternates.size); - + int offset = 6 + 2 * font.alternates.size; for (int i = 0; i < font.alternates.size; i++) { // offset to each alternate set fd.add_ushort ((uint16) offset); offset += 2; - offset += 2 * font.alternates.size; + offset += 2 * font.alternates.get (i).alternates.size; } // alternates - fd.add_ushort ((uint16) font.alternates.size); foreach (Alternate alternate in font.alternates) { + fd.add_ushort ((uint16) alternate.alternates.size); + foreach (string alt in alternate.alternates) { fd.add_ushort ((uint16) glyf_table.get_gid (alt)); }