The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix warnings

These changes was commited to the Birdfont repository Fri, 25 Aug 2017 19:07:14 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Fri, 25 Aug 2017 19:07:14 +0000]

Updated Files

libbirdfont/ExportTool.vala
libbirdfont/GlyphRange.vala
libbirdfont/KerningTools.vala
libbirdfont/OpenFontFormat/GlyfData.vala
libbirdfont/OpenFontFormat/HheaTable.vala
libbirdfont/OverView.vala
libbirdfont/OverViewItem.vala
libbirdfont/Renderer/Text.vala
libbirdfont/TrackTool.vala
--- a/libbirdfont/ExportTool.vala +++ b/libbirdfont/ExportTool.vala @@ -461,23 +461,6 @@ } return (!) d; - } - - static bool can_write (File folder) { - File test = get_child (folder, "text.tmp"); - bool writable = false; - - try { - writable = FileUtils.set_contents ((!) test.get_path (), "test"); - - if (writable) { - FileUtils.remove ((!) test.get_path ()); - } - } catch (GLib.Error e) { - writable = false; - } - - return writable; } public static File get_export_dir () {
--- a/libbirdfont/GlyphRange.vala +++ b/libbirdfont/GlyphRange.vala @@ -479,7 +479,6 @@ } public unichar get_character (uint32 index) { - int64 ti; string chr; UniRange r; unichar c;
--- a/libbirdfont/KerningTools.vala +++ b/libbirdfont/KerningTools.vala @@ -129,9 +129,8 @@ Tool right_to_left = new Tool ("right_to_left", t_("Right to left")); right_to_left.select_action.connect ((self) => { - KerningDisplay d = MainWindow.get_kerning_display (); - d.right_to_left = !d.right_to_left; - right_to_left.set_selected (d.right_to_left); + KerningDisplay.right_to_left = !KerningDisplay.right_to_left; + right_to_left.set_selected (KerningDisplay.right_to_left); GlyphCanvas.redraw (); }); kerning_tools.add_tool (right_to_left);
--- a/libbirdfont/OpenFontFormat/GlyfData.vala +++ b/libbirdfont/OpenFontFormat/GlyfData.vala @@ -57,7 +57,6 @@ } public GlyfData (Glyph g) { - bool process; PathList all_quadratic = g.get_quadratic_paths (); PathList qp = new PathList (); @@ -149,7 +148,6 @@ end_points.clear (); end_point = 0; - int path_number = 0; foreach (Path quadratic in paths) { if (unlikely (quadratic.points.size == 0)) { warning (@"No points in path (before conversion $(quadratic.points.size))");
--- a/libbirdfont/OpenFontFormat/HheaTable.vala +++ b/libbirdfont/OpenFontFormat/HheaTable.vala @@ -111,7 +111,6 @@ FontData fd = new FontData (); Fixed version = 1 << 16; Font font = OpenFontFormatWriter.get_current_font (); - int upm, total_height; fd.add_fixed (version); // table version
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -93,7 +93,6 @@ TabBar tabs = MainWindow.get_tab_bar (); string n = glyph_collection.get_current ().name; bool selected = tabs.select_char (n); - Glyph g = glyph_collection.get_current (); GlyphTab glyph_tab; if (!selected) { @@ -1439,7 +1438,6 @@ selected_item = get_selected_item (); if (selected_item.glyphs != null) { open_glyph_signal ((!) selected_item.glyphs); - GlyphCollection? gc2 = selected_item.glyphs; GlyphCollection gc = (!) selected_item.glyphs; gc.get_current ().close_path (); } else {
--- a/libbirdfont/OverViewItem.vala +++ b/libbirdfont/OverViewItem.vala @@ -99,7 +99,6 @@ } Glyph g; - Font font; double gx, gy; double x1, x2, y1, y2; double scale_box; @@ -150,16 +149,10 @@ } public void draw_background () { - Glyph g; - Font font; - double gx, gy; - double x1, x2, y1, y2; double scale_box; double w, h; - double glyph_width, glyph_height; Surface s; Context c; - Color color = Color.black (); w = width; h = height;
--- a/libbirdfont/Renderer/Text.vala +++ b/libbirdfont/Renderer/Text.vala @@ -168,7 +168,6 @@ } if (word_with_ligatures.glyph.size > 0) { - double none = 0; g = word_with_ligatures.glyph.get (0); if (g != null) { margin_left = ((!) g).get_left_side_bearing (); @@ -359,10 +358,6 @@ } public void draw_at_baseline (Context cr, double px, double py, string cacheid = "") { - double x, y; - double ratio; - double cc_y; - if (cache == null) { cache = draw_on_cache_surface (cacheid); }
--- a/libbirdfont/TrackTool.vala +++ b/libbirdfont/TrackTool.vala @@ -108,8 +108,7 @@ if (end_point.is_first ()) { end_point.path.reverse (); } - - Path path = end_point.path; + glyph.set_active_path (end_point.path); } else { p = new Path (); @@ -530,10 +529,7 @@ * @return the last removed point. */ public void convert_points_to_line () { - EditPoint ep, last_point; - double sum_x, sum_y, nx, ny; - int px, py; - EditPoint average, previous; + double sum_x, sum_y; Path p; Glyph glyph; Gee.ArrayList<EditPoint> points;