The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge ../birdfont-2.x

These changes was commited to the Birdfont repository Sat, 04 Jun 2016 14:50:11 +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>
Sat, 04 Jun 2016 14:50:11 +0000 (16:50 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 04 Jun 2016 14:50:11 +0000 (16:50 +0200)
commit 321166c20d7f747f36cd905e9ca52dc0b2af6b8a
tree 83a0813e91586d4441446eb88ca9b9a2a6bdc70d
parent ade9ddce3f8a21894bd663e3dfdd5ed914b45c68
parent 2420772416abcf3ed48f918083a75e5c9f91fef8
Merge ../birdfont-2.x

libbirdfont/Font.vala
libbirdfont/OpenFontFormat/GlyfTable.vala
libbirdfont/SvgParser.vala
scripts/version.py
--- a/libbirdfont/Font.vala +++ b/libbirdfont/Font.vala @@ -438,9 +438,16 @@ public GlyphCollection get_nonmarking_return () { Glyph g; GlyphCollection gc; + GlyphCollection? non_marking; if (has_glyph ("nonmarkingreturn")) { - return (!) get_glyph_collection ("nonmarkingreturn"); + non_marking = get_glyph_collection ("nonmarkingreturn"); + + if (non_marking == null) { + warning ("Non marking return not created."); + } else { + return (!)non_marking; + } } gc = new GlyphCollection ('\r', "nonmarkingreturn"); @@ -462,9 +469,16 @@ public GlyphCollection get_null_character () { Glyph n; GlyphCollection gc; + GlyphCollection? none; if (has_glyph ("null")) { - return (!) get_glyph_collection ("null"); + none = get_glyph_collection ("null"); + + if (none == null) { + warning("Null character not created."); + } else { + return (!) none; + } } gc = new GlyphCollection ('\0', "null"); @@ -485,14 +499,19 @@ public GlyphCollection get_space () { Glyph n; - GlyphCollection gc; + GlyphCollection gc; + GlyphCollection? space = null; if (has_glyph (" ")) { - return (!) get_glyph_collection (" "); + space = get_glyph_collection (" "); } if (has_glyph ("space")) { - return (!) get_glyph_collection ("space"); + space = get_glyph_collection ("space"); + } + + if (space != null) { + return (!) space; } gc = new GlyphCollection (' ', "space");
--- a/libbirdfont/OpenFontFormat/GlyfTable.vala +++ b/libbirdfont/OpenFontFormat/GlyfTable.vala @@ -113,15 +113,17 @@ foreach (GlyphCollection gc in glyphs) { g = gc.get_current (); + + printd (@"adding glyph: $(gc.get_name ())\n"); + // set values for loca table assert (fd.length () % 4 == 0); location_offsets.add (fd.length ()); process_glyph (g, fd); - printd (@"adding glyph: $(g.name)\n"); printd (@"glyf length: $(fd.length () - last_len)\n"); printd (@"loca fd.length (): $(fd.length ())\n"); - + last_len = fd.length (); } @@ -193,6 +195,13 @@ foreach (GlyphCollection ug in unassigned_glyphs) { glyphs.add (ug); + } + + + int gid = 0; + foreach (GlyphCollection ug in glyphs) { + printd (@"Glyph: $(ug.get_name ()) GID: $(gid)\n"); + gid++; } }
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -1491,7 +1491,10 @@ return 0; } - return double.parse ((!) s); + string d = (!) s; + d = d.replace ("px", ""); + + return double.parse (d); } static bool is_point (string? s) {
--- a/scripts/version.py +++ b/scripts/version.py @@ -13,7 +13,7 @@ Lesser General Public License for more details. """ - VERSION = '2.15.6' + VERSION = '2.16.0' SO_VERSION_MAJOR = '36' SO_VERSION_MINOR = '0' SO_VERSION = SO_VERSION_MAJOR + '.' + SO_VERSION_MINOR