The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Line cap icons

These changes was commited to the Birdfont repository Tue, 12 May 2015 05:59:58 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 12 May 2015 05:59:58 +0000]

Updated Files

libbirdfont/DrawingTools.vala
libbirdfont/StrokeTool.vala
resources/icons.bf
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -852,6 +852,22 @@ stroke_expander.add_tool (outline); // set line cap + Tool line_cap_butt = new Tool ("line_cap_butt", t_("Butt line cap")); + line_cap_butt.select_action.connect ((self) => { + Glyph g; + + g = MainWindow.get_current_glyph (); + g.store_undo_state (); + + foreach (Path p in g.active_paths) { + p.line_cap = LineCap.BUTT; + p.reset_stroke (); + } + + GlyphCanvas.redraw (); + }); + stroke_expander.add_tool (line_cap_butt); + Tool line_cap_round = new Tool ("line_cap_round", t_("Round line cap")); line_cap_round.select_action.connect ((self) => { Glyph g;
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -355,7 +355,7 @@ stroke1.add_point (n); } - cap.remove_points_on_points (); // FIXME: + cap.remove_points_on_points (); return_if_fail (0 < f < stroke1.points.size); first = stroke1.points.get (f);
--- a/resources/icons.bf +++ b/resources/icons.bf @@ -480,6 +480,27 @@ <path stroke="0" skew="0" data="S 16.3457544910,11.1720448618 D 12.9964458443,7.8227362151 3.5780616609,3.9215137507 -1.1585760518,3.9215137507 T D -5.8952137645,3.9215137507 -15.3135979478,7.8227362152 -18.6629065945,11.1720448618 T D -22.0122152412,14.5213535084 -25.9134377056,23.9397376918 -25.9134377056,28.6763754045 T D -25.9134377056,33.4130131172 -22.0122152411,42.8313973006 -18.6629065945,46.1807059473 T D -15.3135979479,49.5300145940 -5.8952137645,53.4312370584 -1.1585760518,53.4312370584 T D 3.5780616609,53.4312370584 12.9964458443,49.5300145940 16.3457544910,46.1807059473 T D 19.6950631377,42.8313973006 23.5962856021,33.4130131172 23.5962856021,28.6763754045 T D 23.5962856021,23.9397376918 19.6950631377,14.5213535084 16.3457544910,11.1720448618 T" /> <path stroke="0" skew="0" data="S 19.0193836125,28.5566343042 D 19.0193836125,32.3716968002 15.8771953315,39.9576103638 13.1795387700,42.6552669253 T D 10.4818822084,45.3529234869 2.8959686448,48.4951117679 -0.9190938511,48.4951117679 T D -4.7341563471,48.4951117679 -12.3200699106,45.3529234868 -15.0177264722,42.6552669253 T D -17.7153830338,39.9576103638 -20.8575713148,32.3716968002 -20.8575713148,28.5566343042 T D -20.8575713148,24.7415718082 -17.7153830338,17.1556582447 -15.0177264722,14.4580016831 T D -12.3200699107,11.7603451216 -4.7341563471,8.6181568405 -0.9190938511,8.6181568405 T D 2.8959686448,8.6181568405 10.4818822085,11.7603451215 13.1795387700,14.4580016831 T D 15.8771953315,17.1556582447 19.0193836125,24.7415718082 19.0193836125,28.5566343042 T" /> <path stroke="0" skew="0" data="B 3.6031455894,42.2522867907 M -11.4649549106,27.1840862907 M 3.8796255894,14.8808862907 M 3.6031455894,42.2522867907" /> + </glyph> + </collection> + <collection name="line_cap_butt"> + <selected id="1"/> + <glyph id="1" left="-28" right="28"> + <path stroke="0" skew="0" data="B 9.8735632184,47.0621466730 C 9.8735632184,43.0881466730 9.8735632184,39.1141466730 9.8735632184,35.1401466730 C 9.8735632184,31.1401466730 9.8735632184,27.1401466730 9.8735632184,23.1401466730 C 9.8735632184,17.7809466730 9.8735632184,12.4217466730 9.8735632184,7.0625466730 C 3.2068965517,7.0625466730 -3.4597701149,7.0625466730 -10.1264367816,7.0625466730 C -10.1264367816,12.4217466730 -10.1264367816,17.7809466730 -10.1264367816,23.1401466730 C -10.1264367816,27.1401466730 -10.1264367816,31.1401466730 -10.1264367816,35.1401466730 C -10.1264367816,39.1141466730 -10.1264367816,43.0881466730 -10.1264367816,47.0621466730 M 9.8735632184,47.0621466730" /> + <path stroke="0" skew="0" data="B -2.2844827586,47.0625466730 M -2.2844827586,44.7378466730 M -2.2844827586,42.3078466730 M -2.2844827586,29.8072466730 M -2.2844827586,20.2372466730 C -2.2844827586,15.8457863397 -2.2844827586,11.4543260063 -2.2844827586,7.0628656730 C -1.2844827586,7.0628656730 1.4166666667,7.0628656730 2.4166666667,7.0628656730 C 2.4166666667,11.4543260063 2.4166666667,15.8457863397 2.4166666667,20.2372466730 M 2.4166666667,29.8072466730 M 2.4166666667,42.3078466730 M 2.4166666667,44.7378466730 M 2.4166666667,47.0625466730 M -2.2844827586,47.0625466730" /> + </glyph> + </collection> + <collection name="line_cap_round"> + <selected id="1"/> + <glyph id="1" left="-28" right="28"> + <path stroke="0" skew="0" data="B 11.1637931034,7.3304597701 M -8.9367816092,7.2661770115 C -8.9367816092,10.8661770115 -8.9367816092,22.0150275862 -8.9367816092,25.6150275862 C -8.9367816092,26.8150275862 -8.9367816092,28.0150275862 -8.9367816092,29.2150275862 C -8.9367816092,31.5916275862 -8.9367816092,33.9682275862 -8.9367816092,36.3448275862 C -8.9367816092,38.4049408820 -8.2378557663,40.5560134425 -7.0269515529,42.2226801091 C -5.8160473396,43.8893467758 -3.9862357273,45.2187827305 -2.0269515529,45.8553927492 T C -0.0676673786,46.4920027679 2.1941041602,46.4920027680 4.1533883346,45.8553927492 T C 6.1126725089,45.2187827304 7.9424841212,43.8893467758 9.1533883346,42.2226801091 T C 10.3642925479,40.5560134425 11.0632183908,38.4049408820 11.0632183908,36.3448275862 C 11.0632183908,34.8690006142 11.0632183908,28.1302947618 11.0632183908,25.6150275862 C 11.0632183908,22.0150275862 11.0632183908,10.7598551724 11.1637931034,7.3304597701" /> + <path stroke="0" skew="0" data="B -1.4454022989,36.0000000000 M -1.4454022989,33.6753000000 M -1.4454022989,31.2453000000 M -1.4454022989,18.7447000000 M -1.4454022989,9.1747000000 M -1.4454022989,7.2704339425 M 3.2557471264,7.2704339425 M 3.2557471264,9.1747000000 M 3.2557471264,18.7447000000 M 3.2557471264,31.2453000000 M 3.2557471264,33.6753000000 M 3.2557471264,36.0000000000 M -1.4454022989,36.0000000000" /> + </glyph> + </collection> + <collection name="line_cap_square"> + <selected id="1"/> + <glyph id="1" left="-28" right="32"> + <path stroke="0" skew="0" data="B 12.0000000000,47.9996000000 C 12.0000000000,44.0256000000 12.0000000000,40.0516000000 12.0000000000,36.0776000000 M 12.0000000000,24.0776000000 M 12.0000000000,8.0000000000 M -8.0000000000,8.0000000000 M -8.0000000000,24.0776000000 M -8.0000000000,36.0776000000 C -8.0000000000,40.0516000000 -8.0000000000,44.0256000000 -8.0000000000,47.9996000000 M 12.0000000000,47.9996000000" /> + <path stroke="0" skew="0" data="B -0.3189655172,32.8505747126 M -0.3189655172,30.5258747126 M -0.3189655172,28.0958747126 M -0.3189655172,15.5952747126 M -0.3189655172,10.7034356322 M -0.3189655172,8.0549167011 M 4.3821839081,8.0549167011 M 4.3821839081,10.7034356322 M 4.3821839081,15.5952747126 M 4.3821839081,28.0958747126 M 4.3821839081,30.5258747126 M 4.3821839081,32.8505747126 M -0.3189655172,32.8505747126" /> </glyph> </collection> <collection unicode="U+6d"> @@ -1084,14 +1105,17 @@ <ligature sequence="s c a l e _ b a c k g r o u n d" replacement="scale_background"/> <ligature sequence="q u a d r a t i c _ p o i n t s" replacement="quadratic_points"/> <ligature sequence="o r i e n t a t i o n _ b o t h" replacement="orientation_both"/> + <ligature sequence="l i n e _ c a p _ s q u a r e" replacement="line_cap_square"/> <ligature sequence="m o v e _ b a c k g r o u n d" replacement="move_background"/> <ligature sequence="f l i p _ h o r i z o n t a l" replacement="flip_horizontal"/> <ligature sequence="s h o w _ b a c k g r o u n d" replacement="show_background"/> <ligature sequence="z o o m _ b o u n d a r i e s" replacement="zoom_boundaries"/> + <ligature sequence="l i n e _ c a p _ r o u n d" replacement="line_cap_round"/> <ligature sequence="i n s e r t _ u n i c h a r" replacement="insert_unichar"/> <ligature sequence="c u t _ b a c k g r o u n d" replacement="cut_background"/> <ligature sequence="u p d a t e _ w e b v i e w" replacement="update_webview"/> <ligature sequence="f i l l _ o p e n _ p a t h" replacement="fill_open_path"/> + <ligature sequence="l i n e _ c a p _ b u t t" replacement="line_cap_butt"/> <ligature sequence="r e s i z e _ h a n d l e" replacement="resize_handle"/> <ligature sequence="d r o p d o w n _ m e n u" replacement="dropdown_menu"/> <ligature sequence="f l i p _ v e r t i c a l" replacement="flip_vertical"/>