Commit c17684a
Better parsing of TrueType outlines Fixes parsing of "c with hook" in DejaVu Sans Extra Light
Changed files (3)
modifiedlibbirdfont/BirdFontFile.valamodifiedlibbirdfont/OverViewItem.valamodifiedlibbirdfont/Renderer/FallbackFont.vala
Diff
@@ -738,6 +738,7 @@ class BirdFontFile : GLib.Object { if (t.get_name () == "weight") { font.weight = int.parse (t.get_content ()); }+ if (t.get_name () == "images") { parse_images (t); }@@ -1391,7 +1392,7 @@ class BirdFontFile : GLib.Object { } public static void close (Path path) {- EditPoint ep1, ep2;+ EditPoint ep1, ep2, last; if (path.points.size < 2) { warning ("Less than two points in path.");@@ -1404,10 +1405,12 @@ class BirdFontFile : GLib.Object { path.points.remove_at (path.points.size - 1); - ep2.tie_handles = ep1.tie_handles;- ep2.left_handle.angle = ep1.left_handle.angle;- ep2.left_handle.length = ep1.left_handle.length;- ep2.left_handle.type = ep1.left_handle.type;+ if (ep1.type != PointType.QUADRATIC || ep2.type != PointType.QUADRATIC) {+ ep2.tie_handles = ep1.tie_handles;+ ep2.left_handle.angle = ep1.left_handle.angle;+ ep2.left_handle.length = ep1.left_handle.length;+ ep2.left_handle.type = ep1.left_handle.type;+ } path.close (); }@@ -48,8 +48,7 @@ public class OverViewItem : GLib.Object { this.y = y; this.character = character; this.glyphs = glyphs;- this.info = new CharacterInfo (character, glyphs);- info.set_position (x + width - 17, y + height - 22.5);+ this.info = new CharacterInfo (character, glyphs); label = new Text ((!) character.to_string (), 17); truncate_label ();@@ -110,10 +109,9 @@ public class OverViewItem : GLib.Object { bool a; GlyphCollection g; bool s = (x <= px <= x + width) && (y <= py <= y + height);- + if (has_icons () && glyphs != null) { g = (!) glyphs;- version_menu.set_position (x + width - 21, y + height - 18); a = version_menu.menu_item_action (px, py); // select one item on the menu if (a) {@@ -123,6 +121,7 @@ public class OverViewItem : GLib.Object { version_menu.menu_icon_action (px, py); // click in the open menu } + info.set_position (x + width - 17, y + height - 22.5); if (has_icons () && info.is_over_icon (px, py)) { MainWindow.get_overview ().set_character_info (info); }@@ -151,9 +151,6 @@ public class FallbackFont : GLib.Object { if (glyph_data == null) { font_file = find_font (font_config, (!) c.to_string ()); if (font_file != null) {- printd ((!) font_file); // FIXME: DELETE- printd ("\n");- font = open_font ((!) font_file); glyph_data = get_glyph_in_font (font, c); close_font (font);