Commit a057241
various improvements
Changed files (5)
modifiedlibbirdfont/BirdFontFile.valamodifiedlibbirdfont/Font.valamodifiedlibbirdfont/OpenFontFormat/load_font.cmodifiedlibbirdfont/Toolbox.valamodifiedlibbirdfont/TooltipArea.vala
Diff
@@ -837,6 +837,10 @@ class BirdFontFile { Path path = new Path (); string instruction = ""; + if (data == "") {+ return path;+ }+ return_val_if_fail (d.length > 1, path); if (d[0] != "S") {@@ -750,7 +750,7 @@ public class Font : GLib.Object { unichar c; unichar rc = 0; bool r;-+ if (unlikely (!unicode.has_prefix ("U+"))) { warning (@"All unicode values must begin with U+ ($unicode)"); return '\0';@@ -528,7 +528,7 @@ GString* get_kerning_data (FT_Face face, FT_Long gid) { } if (kerning.x > 0 && char_left > 31) {- g_string_append_printf (bf, "<hkern left=\"U+%x;\" right=\"U+%x;\" kerning=\"%d\"/>\n", char_left, char_right, kerning.x);+ g_string_append_printf (bf, "<hkern left=\"U+%x\" right=\"U+%x\" kerning=\"%d\"/>\n", char_left, char_right, kerning.x); } } @@ -620,6 +620,8 @@ GString* get_bf_font (FT_Face face, char* file, int* err) { g_string_append (bf, "</font>\n"); + bird_font_progress_bar_set_progress (0);+ return bf; } @@ -112,7 +112,7 @@ public class Toolbox : GLib.Object { draw_tool_modifiers.add_tool (quadratic_points); // two quadratic points off curve for each quadratic control point- Tool double_points = new Tool ("double_points", _("Quadratic double point"));+ Tool double_points = new Tool ("double_points", _("Quadratic path with two line handles")); double_points.select_action.connect ((self) => { point_type = PointType.DOUBLE_CURVE; });@@ -97,6 +97,8 @@ public class TooltipArea : GLib.Object { } public void draw (Context cr, Allocation alloc) {+ int w;+ cr.save (); cr.rectangle (0, 0, alloc.width, alloc.height); cr.set_line_width (0);@@ -122,19 +124,21 @@ public class TooltipArea : GLib.Object { cr.restore (); cr.save ();- cr.rectangle (0, 0, alloc.width * ProgressBar.get_progress (), alloc.height);+ w = (int) (alloc.width * ProgressBar.get_progress ());+ cr.rectangle (0, 2, w, alloc.height - 2); cr.set_line_width (0);- cr.set_source_rgba (255/255.0, 255/255.0, 255/255.0, 1);+ cr.set_source_rgba (145/255.0, 160/255.0, 190/255.0, 1); cr.fill_preserve (); cr.stroke (); cr.restore ();- - cr.save ();- cr.set_font_size (14);- cr.move_to (5, 15);- cr.show_text (tool_tip);- cr.restore ();-+ + if (w == 0) {+ cr.save ();+ cr.set_font_size (14);+ cr.move_to (5, 15);+ cr.show_text (tool_tip);+ cr.restore ();+ } } }