Commit 70363dc
improved error messages and caption in overview on mac
Changed files (5)
modifiedlibbirdfont/Font.valamodifiedlibbirdfont/Line.valamodifiedlibbirdfont/OverView.valamodifiedlibbirdfont/ZoomTool.valamodifiedscripts/macport_build.py
Diff
@@ -592,6 +592,11 @@ public class Font : GLib.Object { Toolbox.select_tool_by_name ("cubic_points"); font_file = path; loaded = parse_svg_file (path);+ + if (!loaded) {+ warning ("Failed to load SVG font.");+ }+ format = FontFormat.SVG; } @@ -613,6 +618,11 @@ public class Font : GLib.Object { Toolbox.select_tool_by_name ("double_points"); font_file = path; loaded = parse_freetype_file (path);+ + if (!loaded) {+ warning ("Failed to load TTF font.");+ }+ format = FontFormat.FREETYPE; } @@ -620,6 +630,11 @@ public class Font : GLib.Object { Toolbox.select_tool_by_name ("cubic_points"); font_file = path; loaded = parse_freetype_file (path);+ + if (!loaded) {+ warning ("Failed to load OTF font.");+ }+ format = FontFormat.FREETYPE; } @@ -654,7 +669,7 @@ public class Font : GLib.Object { data = load_freetype_font (path, out error); if (error != 0) {- warning ("Failed to load font.");+ warning ("Failed to load freetype font."); return false; } @@ -668,6 +683,8 @@ public class Font : GLib.Object { if (parsed) { Preferences.add_recent_files (path);+ } else {+ warning ("Failed to parse loaded freetype font."); } return parsed;@@ -145,7 +145,9 @@ public class Line : GLib.Object { pos = Glyph.path_coordinate_x (x); redraw_line (); // draw at new position } else {- pos = -Glyph.path_coordinate_y (y);+ // SIC: strange ...+ //pos = Glyph.path_coordinate_y (y);+ redraw_line (); } @@ -327,17 +327,15 @@ public class OverView : FontDisplay { cr.restore (); draw_menu (cr, character_string, x, y);+ draw_character_info_icon (cr, character_string, x, y); caption_y = y + 10 + nail_height - 20; cr.move_to (x, caption_y);- cr.show_text (character_string); - cr.show_text ("Q");- - cr.move_to (0, 0);- cr.show_text ("X");+ cr.set_source_rgba (80/255.0, 95/255.0, 137/255.0, 0.5);+ cr.show_text (character_string); x += nail_width; index++;@@ -42,8 +42,10 @@ class ZoomTool : Tool { }); move_action.connect((self, x, y) => {+ Glyph g;+ if (zoom_area_begin_x > 0) {- Glyph g = MainWindow.get_current_glyph ();+ g = MainWindow.get_current_glyph (); g.show_zoom_area (zoom_area_begin_x, zoom_area_begin_y, x, y); } });@@ -50,6 +50,9 @@ def build(prefix, cc, cflags, ldflags, valac): --pkg gdk-pixbuf-2.0 \ --pkg webkit-1.0""") + #copy c sources + run("cp libbirdfont/OpenFontFormat/*.c build/libbirdfont/")+ run(cc + " " + cflags + """ \ -c build/libbirdfont/*.c \ -fno-common \