Commit 6e980f5
Fix warnings
Changed files (9)
modifiedlibbirdfont/ExportTool.valamodifiedlibbirdfont/GlyphRange.valamodifiedlibbirdfont/KerningTools.valamodifiedlibbirdfont/OpenFontFormat/GlyfData.valamodifiedlibbirdfont/OpenFontFormat/HheaTable.valamodifiedlibbirdfont/OverView.valamodifiedlibbirdfont/OverViewItem.valamodifiedlibbirdfont/Renderer/Text.valamodifiedlibbirdfont/TrackTool.vala
Diff
@@ -463,23 +463,6 @@ os.put_string ( 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 () { return File.new_for_path (get_export_folder ()); }@@ -479,7 +479,6 @@ public class GlyphRange { } public unichar get_character (uint32 index) {- int64 ti; string chr; UniRange r; unichar c; @@ -129,9 +129,8 @@ public class KerningTools : ToolCollection { 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);@@ -57,7 +57,6 @@ public class GlyfData : GLib.Object { } public GlyfData (Glyph g) {- bool process; PathList all_quadratic = g.get_quadratic_paths (); PathList qp = new PathList (); @@ -149,7 +148,6 @@ public class GlyfData : GLib.Object { 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))");@@ -111,7 +111,6 @@ public class HheaTable : OtfTable { FontData fd = new FontData (); Fixed version = 1 << 16; Font font = OpenFontFormatWriter.get_current_font ();- int upm, total_height; fd.add_fixed (version); // table version @@ -93,7 +93,6 @@ public class OverView : FontDisplay { 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 @@ public class OverView : FontDisplay { 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 {@@ -99,7 +99,6 @@ public class OverViewItem : GLib.Object { } Glyph g;- Font font; double gx, gy; double x1, x2, y1, y2; double scale_box;@@ -150,16 +149,10 @@ public class OverViewItem : GLib.Object { } 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;@@ -168,7 +168,6 @@ public class Text : Widget { } 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 class Text : Widget { } 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); }@@ -108,8 +108,7 @@ public class TrackTool : Tool { 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 @@ public class TrackTool : Tool { * @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;