The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge branch 'master' of github.com:johanmattssonm/birdfont

These changes was commited to the Birdfont repository Sun, 12 Apr 2015 19:17:28 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 12 Apr 2015 19:17:28 +0000 (21:17 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 12 Apr 2015 19:17:28 +0000 (21:17 +0200)
commit 085a644c098201d7db45b5be9bf81ee15099b15d
tree f2ea595d9b3dac407839401841b4ec83cbaddf72
parent b84b9159154515ee3ce9041080d74cf7bd832cc1
parent cef1661d5183720e0b3996660d392209534cf44d
Merge branch 'master' of github.com:johanmattssonm/birdfont

libbirdfont/Renderer/Text.vala
libbirdfont/TabBar.vala
--- a/libbirdfont/Renderer/Text.vala +++ b/libbirdfont/Renderer/Text.vala @@ -456,14 +456,15 @@ double by; if (path.points.size > 0) { - - prev = path.points.get (0); + path.add_hidden_double_points (); + + prev = path.points.get (path.points.size - 1); xa = (prev.x - lsb) * scale + x; ya = y - prev.y * scale; cr.move_to (xa, ya); by = (y - font.base_line * scale); - for (int i = 1; i < path.points.size; i++) { + for (int i = 0; i < path.points.size; i++) { e = path.points.get (i).copy (); PenTool.convert_point_segment_type (prev, e, PointType.CUBIC); @@ -481,20 +482,6 @@ prev = e; } - - // close path - e = path.points.get (0); - - xb = (prev.get_right_handle ().x - lsb) * scale + x; - yb = by - prev.get_right_handle ().y * scale; - - xc = (e.get_left_handle ().x - lsb) * scale + x; - yc = by - e.get_left_handle ().y * scale; - - xd = (e.x - lsb) * scale + x; - yd = by - e.y * scale; - - cr.curve_to (xb, yb, xc, yc, xd, yd); } }
--- a/libbirdfont/TabBar.vala +++ b/libbirdfont/TabBar.vala @@ -777,11 +777,11 @@ label = new Text (); label.use_cache (false); label.set_text (t.get_label ()); - text_height = 16 / scale; + text_height = (int) (16 / scale); label.set_font_size (text_height); text_width = label.get_extent (); center_x = tab_width / 2.0 - text_width / 2.0; - center_y = tab_height / 2.0 + 4 / scale; + center_y = (int) (tab_height / 2.0 + 4 / scale); if (tab_index == selected) { Theme.text_color (label, "Foreground 4");