Birdfont

Birdfont – Source Code


All Repositories / birdfont.git / commit

Build on Windows

These changes was commited to the Birdfont repository Sun, 08 Jun 2014 15:34:09 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://git.gitorious.org/birdfont/birdfont.git
You can also create your own clone at gitorious.org/birdfont.
Build on Windows
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 08 Jun 2014 15:34:09 +0000 (17:34 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 08 Jun 2014 15:34:09 +0000 (17:34 +0200)
commit 3c1a7f33392ae869ffe16e4fd068dc52dae5dd79
tree 82831dc1b71f124da7c5ed8d69ae12658d0dcf02
parent a8590aa75676b13ffc5dc99f7aadf2a0c031b31e
Build on Windows

libbirdfont/Glyph.vala
libbirdfont/GlyphRange.vala
libbirdfont/KerningClasses.vala
libbirdfont/KerningPair.vala
libbirdfont/Path.vala
diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.vala
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -541,11 +541,17 @@ public void sort_help_lines () { vertical_help_lines.sort ((a, b) => { - return (int) (a.get_pos () - b.get_pos ()); + Line first, next; + first = (Line) a; + next = (Line) b; + return (int) (first.get_pos () - next.get_pos ()); }); horizontal_help_lines.sort ((a, b) => { - return (int) (a.get_pos () - b.get_pos ()); + Line first, next; + first = (Line) a; + next = (Line) b; + return (int) (first.get_pos () - next.get_pos ()); }); }
diff --git a/libbirdfont/GlyphRange.vala b/libbirdfont/GlyphRange.vala
--- a/libbirdfont/GlyphRange.vala +++ b/libbirdfont/GlyphRange.vala @@ -55,8 +55,15 @@ // TODO: complete localized alphabetical sort åäö is not the right order for example. public void sort () { ranges.sort ((a, b) => { - bool r = a.start > b.start; - return_val_if_fail (a.start != b.start, 0); + UniRange first, next; + bool r; + + first = (UniRange) a; + next = (UniRange) b; + + r = first.start > next.start; + return_val_if_fail (first.start != next.start, 0); + return (r) ? 1 : -1; }); }
diff --git a/libbirdfont/KerningClasses.vala b/libbirdfont/KerningClasses.vala
--- a/libbirdfont/KerningClasses.vala +++ b/libbirdfont/KerningClasses.vala @@ -359,7 +359,10 @@ } left_glyphs.sort ((a, b) => { - return strcmp (a.get_name (), b.get_name ()); + Glyph first, next; + first = (Glyph) a; + next = (Glyph) b; + return strcmp (first.get_name (), next.get_name ()); }); // add the right hand glyph and the kerning value
diff --git a/libbirdfont/KerningPair.vala b/libbirdfont/KerningPair.vala
--- a/libbirdfont/KerningPair.vala +++ b/libbirdfont/KerningPair.vala @@ -39,10 +39,13 @@ public void sort () { kerning.sort ((a, b) => { - return strcmp (((!)a.glyph).get_unichar_string (), ((!)b.glyph).get_unichar_string ()); + Kerning first, next; + first = (Kerning) a; + next = (Kerning) b; + return strcmp (((!)first.glyph).get_unichar_string (), ((!)next.glyph).get_unichar_string ()); }); } } }
diff --git a/libbirdfont/Path.vala b/libbirdfont/Path.vala
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -745,7 +745,10 @@ } ycoordinates.sort ((a, b) => { - return (a.y < b.y) ? 1 : -1; + EditPoint first, next; + first = (EditPoint) a; + next = (EditPoint) b; + return (first.y < next.y) ? 1 : -1; }); for (int i = 0; i < ycoordinates.size - 1; i++) {