Commit c9d5583
Merge branch 'master' of gitorious.org:birdfont/birdfont Conflicts: libbirdfont/PenTool.vala
Changed files (8)
modifiedNEWSmodifiedlibbirdfont/EditPoint.valamodifiedlibbirdfont/PenTool.valaaddedscripts/build.pymodifiedscripts/run.pymodifiedscripts/translations.pymodifiedscripts/version.pyaddedscripts/windows_build.py
Diff
@@ -1,3 +1,18 @@+birdfont (0.24) stable;++ * Bug fixes++ -- Johan Mattsson <johan.mattsson.m@gmail.com> Thu Aug 1 23:08:20 CEST 2013++birdfont (0.24) stable;++ * New overview tab+ * Two control point handles for quadratic paths+ * Better conversion from SVG to TTF+ * Bug fixes++ -- Johan Mattsson <johan.mattsson.m@gmail.com> Wed Jul 31 14:34:12 CEST 2013+ birdfont (0.23) stable; * Bugfixes @@ -341,6 +341,11 @@ public class EditPoint { x = 0; y = 0; }+ + if (type == PointType.QUADRATIC) {+ right_handle.process_connected_handle ();+ left_handle.process_connected_handle ();+ } } public static void to_coordinate (ref double x, ref double y) {@@ -323,7 +323,14 @@ public class PenTool : Tool { public void select_active_point (double x, double y) { Glyph? g = MainWindow.get_current_glyph (); Glyph glyph = (!) g;- bool new_selection;++ control_point_event (x, y);+ + if (active_edit_point == null) {+ if (KeyBindings.modifier != SHIFT) {+ remove_all_selected_points ();+ }+ } move_selected = true; move_point_on_path = true;@@ -345,17 +352,12 @@ public class PenTool : Tool { if (!((!)active_edit_point).is_selected ()) { remove_all_selected_points (); ((!)active_edit_point).set_selected (true);- add_selected_point (((!)active_edit_point));+ selected_point = (!)active_edit_point;+ add_selected_point (selected_point); } } } - if (active_edit_point == null) {- if (KeyBindings.modifier != SHIFT) {- remove_all_selected_points ();- }- }- // continue adding points from the selected one foreach (Path p in glyph.active_paths) { if (p.is_open () && p.points.length () > 0 && active_edit_point == p.points.first ().data) {@@ -734,6 +736,7 @@ public class PenTool : Tool { add_selected_point (new_point); selected_point = new_point;+ add_selected_point (selected_point); move_selected = true; @@ -917,12 +920,19 @@ public class PenTool : Tool { } public static void remove_all_selected_points () {+ selected_point.set_selected (false);+ selected_point.set_active (false);+ selected_point = new EditPoint ();+ foreach (EditPoint e in selected_points) { e.set_active (false); e.set_selected (false); } while (selected_points.length () > 0) {+ EditPoint ep = selected_points.first ().data;+ ep.set_active (false);+ ep.set_selected (false); selected_points.remove_link (selected_points.first ()); } }new file mode 100644@@ -0,0 +1,157 @@+#!/usr/bin/python+"""+Copyright (C) 2013 Johan Mattsson++This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version.++This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details.+"""++import os+import shutil+import subprocess+import sys+from optparse import OptionParser+from run import run++import configfile++def libbirdfont(prefix, cc, cflags, ldflags, valac, valaflags, library):+ #libbirdfont+ run("mkdir -p build/libbirdfont")+ run("mkdir -p build/bin")++ run(valac + """\+ -C \+ """ + valaflags + """ \+ --basedir build/libbirdfont/ \+ --enable-experimental-non-null \+ --enable-experimental \+ --library libbirdfont \+ -H build/libbirdfont/birdfont.h \+ libbirdfont/*.vala \+ libbirdfont/OpenFontFormat/*.vala \+ --pkg libxml-2.0 \+ --pkg gio-2.0 \+ --pkg cairo \+ --pkg libsoup-2.4 \+ --pkg gdk-pixbuf-2.0""")++ #copy c sources + run("cp libbirdfont/OpenFontFormat/*.c build/libbirdfont/")++ run(cc + " " + cflags + """ \+ -c build/libbirdfont/*.c \+ -D 'GETTEXT_PACKAGE="birdfont"' \+ $(pkg-config --cflags libxml-2.0) \+ $(pkg-config --cflags gio-2.0) \+ $(pkg-config --cflags cairo) \+ $(pkg-config --cflags glib-2.0) \+ $(pkg-config --cflags gdk-pixbuf-2.0) \+ -I ./build/mac/birdfont""")+ run("mv ./*.o build/libbirdfont/ ")++ run(cc + " " + ldflags + """ \+ -shared \+ build/libbirdfont/*.o \+ $(freetype-config --libs) \+ $(pkg-config --libs libxml-2.0) \+ $(pkg-config --libs gio-2.0) \+ $(pkg-config --libs cairo) \+ $(pkg-config --libs glib-2.0) \+ $(pkg-config --libs gdk-pixbuf-2.0) \+ -o """ + library)+ run("mv " + library + " build/bin/")++def birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags, library):+ # birdfont-export+ run("mkdir -p build/birdfont-export")+ + run(valac + """ \+ -C \+ --enable-experimental-non-null \+ --enable-experimental \+ --define=MAC birdfont-export/* \+ --vapidir=./ \+ --pkg libxml-2.0 \+ --pkg gio-2.0 \+ --pkg cairo \+ --pkg gdk-pixbuf-2.0 \+ --pkg gtk+-2.0 \+ --pkg libbirdfont""")+ run("mv birdfont-export/*.c build/birdfont-export/")++ run(cc + " " + cflags + """ \+ -c ./build/libbirdfont/birdfont.h build/birdfont-export/*.c \+ -D 'GETTEXT_PACKAGE="birdfont"' \+ $(pkg-config --cflags libxml-2.0) \+ $(pkg-config --cflags gio-2.0) \+ $(pkg-config --cflags cairo) \+ $(pkg-config --cflags glib-2.0) \+ $(pkg-config --cflags gdk-pixbuf-2.0) \+ -I ./build/libbirdfont/""")+ run("mv ./*.o build/birdfont-export/")++ run(cc + " " + ldflags + " \+ build/birdfont-export/*.o \+ build/bin/""" + library + """ \+ $(pkg-config --libs libxml-2.0) \+ $(pkg-config --libs gio-2.0) \+ $(pkg-config --libs cairo) \+ $(pkg-config --libs glib-2.0) \+ $(pkg-config --libs gdk-pixbuf-2.0) \+ -o ./build/bin/birdfont-export""")++ run("touch build/installed")+ run("touch build/configured")+ +def birdfont_gtk(prefix, cc, cflags, ldflags, valac, valaflags, library):+ # birdfont+ run("mkdir -p build/birdfont")+ + run(valac + " " + valaflags + """\+ -C \+ birdfont/* \+ --enable-experimental-non-null \+ --enable-experimental \+ --vapidir=./ \+ --pkg libxml-2.0 \+ --pkg gio-2.0 \+ --pkg cairo \+ --pkg libsoup-2.4 \+ --pkg gdk-pixbuf-2.0 \+ --pkg webkit-1.0 \+ --pkg gtk+-2.0\+ --pkg libbirdfont""")+ run("mv birdfont/*.c build/birdfont/")++ run(cc + " " + cflags + """\+ -c ./build/libbirdfont/birdfont.h build/birdfont/*.c \+ -D 'GETTEXT_PACKAGE="birdfont"' \+ $(pkg-config --cflags libxml-2.0) \+ $(pkg-config --cflags gio-2.0) \+ $(pkg-config --cflags cairo) \+ $(pkg-config --cflags glib-2.0) \+ $(pkg-config --cflags gdk-pixbuf-2.0) \+ $(pkg-config --cflags webkit-1.0) \+ -I ./build/libbirdfont/""")+ run("mv ./*.o build/birdfont/")++ run(cc + " " + ldflags + """ \+ build/birdfont/*.o \+ """ + library + """ \+ $(pkg-config --libs libxml-2.0) \+ $(pkg-config --libs gio-2.0) \+ $(pkg-config --libs cairo) \+ $(pkg-config --libs glib-2.0) \+ $(pkg-config --libs gdk-pixbuf-2.0) \+ $(pkg-config --libs webkit-1.0) \+ $(pkg-config --libs gtk+-2.0) \+ -o ./build/bin/birdfont""")+@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. import subprocess def run(cmd):+ cmd = "bash -c \"" + cmd.replace ("\"", "\\\"") + "\"" process = subprocess.Popen (cmd, shell=True) process.communicate()[0] if not process.returncode == 0:@@ -22,7 +22,9 @@ from run import run def compile_translations (): for f_name in glob.glob('po/*.po'): lang = f_name.replace ("po/", "").replace (".po", "")+ lang = lang.replace ("\\", "/") build_path = "build/locale/" + lang + "/LC_MESSAGES/" target = build_path + "birdfont.mo" run ("mkdir -p " + build_path);+ f_name = f_name.replace ("\\", "/") run ("msgfmt --output=%s %s" % (target, f_name)); @@ -16,5 +16,5 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ -VERSION = '0.24'-SO_VERSION = '2'+VERSION = '0.25'+SO_VERSION = '3'new file mode 100644@@ -0,0 +1,37 @@+#!/usr/bin/python+"""+Copyright (C) 2013 Johan Mattsson++This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version.++This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details.+"""++import build+from translations import compile_translations+import configfile+from run import run++prefix = ""+valac = "valac"+valaflags = ""+cc = "gcc"+cflags = "./build/icon.res -Wl,-subsystem,windows "+ldflags = ""+library_cflags = "-Wl,-subsystem,windows "+library_ldflags= "";+library = "libbirdfont.dll"++configfile.write_config (prefix)+compile_translations()+run("windres ./resources/win32/icon.rc -O coff -o ./build/icon.res")+build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags, library)+build.birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags, library)++print ("Done")