The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix points

These changes was commited to the Birdfont repository Tue, 20 Sep 2016 12:04:53 +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, 20 Sep 2016 12:04:53 +0000]

Updated Files

libsvgbird/Points.vala
resources/icons.bf
--- a/libsvgbird/Points.vala +++ b/libsvgbird/Points.vala @@ -55,21 +55,22 @@ public int add_cubic (double handle_x, double handle_y, double next_handle_x, double next_handle_y, double x, double y) { - - // end point + + int index; + if (size == 0) { - add_type (POINT_LINE); - add (x); - add (y); - add (0); - add (0); - add (0); - add (0); - add (0); + index = 0; + insert_type (index, POINT_LINE); + insert (index + 1, x); + insert (index + 2, y); + insert (index + 3, 0); + insert (index + 4, 0); + insert (index + 5, 0); + insert (index + 6, 0); + insert (index + 7, 0); } - int index = size - 8; - + index = size; insert_type (index, POINT_CUBIC); insert (index + 1, handle_x); insert (index + 2, handle_y); @@ -78,7 +79,7 @@ insert (index + 5, x); insert (index + 6, y); insert (index + 7, 0); - + return index; }
--- a/resources/icons.bf +++ b/resources/icons.bf @@ -48,8 +48,8 @@ <selected id="0"/> <glyph id="0" left="-20" right="33"> <layer name= "Layer" visible="true"> - <path data="S -15.0000000000,10.0000000000 L 15.0000000000,10.0000000000 L 15.0000000000,44.0000000000 M -15.0000000000,44.0000000000 M -15.0000000000,10.0000000000" /> - <path data="S -20.0000000000,49.0000000000 L 20.0000000000,49.0000000000 L 20.0000000000,5.0000000000 M -20.0000000000,5.0000000000 M -20.0000000000,49.0000000000" /> + <path data="S -15.0000000000,10.0000000000 L 15.0000000000,10.0000000000 L 15.0000000000,44.0000000000 L -15.0000000000,44.0000000000 L -15.0000000000,10.0000000000" /> + <path data="S -20.0000000000,49.0000000000 L 20.0000000000,49.0000000000 L 20.0000000000,5.0000000000 L -20.0000000000,5.0000000000 L -20.0000000000,49.0000000000" /> </layer> </glyph> </collection> @@ -1313,6 +1313,18 @@ <path data="S -25.9134377056,28.6763754045 D -25.9134377056,33.4130131172 -22.0122152412,42.8313973006 -18.6629065945,46.1807059473 T D -15.3135979478,49.5300145940 -5.8952137644,53.4312370584 -1.1585760517,53.4312370584 T D 3.5780616610,53.4312370584 12.9964458444,49.5300145940 16.3457544910,46.1807059473 T D 19.6950631376,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 D 12.9964458443,7.8227362152 3.5780616610,3.9215137507 -1.1585760517,3.9215137507 T D -5.8952137644,3.9215137507 -15.3135979478,7.8227362151 -18.6629065945,11.1720448618 T D -22.0122152412,14.5213535084 -25.9134377056,23.9397376918 -25.9134377056,28.6763754045 T" /> <path data="S -15.1374675725,14.3382605828 D -12.4398110110,11.6406040213 -4.8538974474,8.4984157402 -1.0388349514,8.4984157402 T D 2.7762275446,8.4984157402 10.3621411081,11.6406040213 13.0597976697,14.3382605828 T D 15.7574542313,17.0359171443 18.8996425123,24.6218307079 18.8996425123,28.4368932039 T D 18.8996425123,32.2519556999 15.7574542312,39.8378692635 13.0597976697,42.5355258250 T D 10.3621411081,45.2331823866 2.7762275446,48.3753706676 -1.0388349514,48.3753706676 T D -4.8538974474,48.3753706676 -12.4398110110,45.2331823866 -15.1374675725,42.5355258250 T D -17.8351241340,39.8378692634 -20.9773124151,32.2519556999 -20.9773124151,28.4368932039 T D -20.9773124151,24.6218307079 -17.8351241341,17.0359171444 -15.1374675725,14.3382605828 T" /> <path data="B -6.1967776929,14.8808862907 M 9.1478028071,27.1840862907 M -5.9202976929,42.2522867907 M -6.1967776929,14.8808862907" /> + </layer> + </glyph> + </collection> + + <collection name="right_to_left"> + <selected id="0"/> + <glyph id="0" left="-28" right="28"> + <layer name= "Layer" visible="true"> + <path data="B -16.5660050993,25.0660007440 M -22.4601324350,25.0660007440 M -22.4601324350,14.9150371313 M -25.7863310218,14.9150371313 M -25.7863310218,40.0080885030 M -17.4794349467,40.0080885030 Q -13.2398065125,40.0080885030 -10.9648793467,38.0778523340 Q -8.6727278669,36.1476185182 -8.6727278669,32.4594905022 Q -8.6727278669,30.1156331374 -9.9480565539,28.3749750167 Q -11.2061609268,26.6343168959 -13.4638402480,25.7726046987 M -7.5697364427,15.1218465527 M -7.5697364427,14.9150136008 M -11.1199922954,14.9150136008 M -16.5660050993,25.0660007440" /> + <path data="B -22.4601324350,27.7717522422 M -17.3760184707,27.7717522422 Q -14.9115297282,27.7717522422 -13.4638402480,29.0470856353 Q -11.9989499842,30.3224213814 -11.9989499842,32.4594669717 Q -11.9989499842,34.7860882571 -13.3949194612,36.0269541977 Q -14.7736646241,37.2678201382 -17.3932663153,37.2850538645 M -22.4601324350,37.2850538645 M -22.4601324350,27.7717522422" /> + <path data="B 11.9049625094,37.2850773949 M 3.8393244838,37.2850773949 M 3.8393244838,14.9150371313 M 0.5475980556,14.9150371313 M 0.5475980556,37.2850773949 M -7.5008156559,37.2850773949 M -7.5008156559,40.0080885030 M 11.9049625094,40.0080885030 M 11.9049625094,37.2850773949" /> + <path data="B 18.9882263702,17.6208074539 M 30.8798504567,17.6208074539 M 30.8798504567,14.9150371313 M 15.6620042530,14.9150371313 M 15.6620042530,40.0080885030 M 18.9882263702,40.0080885030 M 18.9882263702,17.6208074539" /> </layer> </glyph> </collection> @@ -1801,113 +1813,114 @@ <ligature sequence="o r i e n t a t i o n _ c o u n t e r _ c l o c k w i s e" replacement="orientation_counter_clockwise"/> <ligature sequence="i n s e r t _ g l y p h _ f r o m _ o v e r v i e w" replacement="insert_glyph_from_overview"/> - <ligature sequence="r e s i z e _ h a n d l e _ h o r i z o n t a l" replacement="resize_handle_horizontal"/> <ligature sequence="h i g h _ c o n t r a s t _ b a c k g r o u n d" replacement="high_contrast_background"/> + <ligature sequence="r e s i z e _ h a n d l e _ h o r i z o n t a l" replacement="resize_handle_horizontal"/> <ligature sequence="p r e v i o u s _ k e r n i n g _ s t r i n g" replacement="previous_kerning_string"/> + <ligature sequence="g e n e r a t e _ h t m l _ d o c u m e n t" replacement="generate_html_document"/> <ligature sequence="s h o w _ x h e i g h t _ h e l p l i n e s" replacement="show_xheight_helplines"/> - <ligature sequence="g e n e r a t e _ h t m l _ d o c u m e n t" replacement="generate_html_document"/> + <ligature sequence="o r i e n t a t i o n _ c l o c k w i s e" replacement="orientation_clockwise"/> + <ligature sequence="z o o m _ b a c k g r o u n d _ i m a g e" replacement="zoom_background_image"/> + <ligature sequence="a u t o _ t r a c e _ r e s o l u t i o n" replacement="auto_trace_resolution"/> + <ligature sequence="b a c k g r o u n d _ h e l p _ l i n e s" replacement="background_help_lines"/> <ligature sequence="s h o w _ a l l _ l i n e _ h a n d l e s" replacement="show_all_line_handles"/> - <ligature sequence="b a c k g r o u n d _ h e l p _ l i n e s" replacement="background_help_lines"/> - <ligature sequence="a u t o _ t r a c e _ r e s o l u t i o n" replacement="auto_trace_resolution"/> - <ligature sequence="z o o m _ b a c k g r o u n d _ i m a g e" replacement="zoom_background_image"/> - <ligature sequence="o r i e n t a t i o n _ c l o c k w i s e" replacement="orientation_clockwise"/> + <ligature sequence="n e x t _ k e r n i n g _ s t r i n g" replacement="next_kerning_string"/> <ligature sequence="a u t o _ t r a c e _ s i m p l i f y" replacement="auto_trace_simplify"/> - <ligature sequence="n e x t _ k e r n i n g _ s t r i n g" replacement="next_kerning_string"/> + <ligature sequence="c o n t r a s t _ t h r e s h o l d" replacement="contrast_threshold"/> <ligature sequence="k e r n i n g _ t e x t _ i n p u t" replacement="kerning_text_input"/> - <ligature sequence="c o n t r a s t _ t h r e s h o l d" replacement="contrast_threshold"/> + <ligature sequence="c u r v e _ o r i e n t a t i o n" replacement="curve_orientation"/> + <ligature sequence="s t r o k e _ t o _ o u t l i n e" replacement="stroke_to_outline"/> + <ligature sequence="s e l e c t _ b a c k g r o u n d" replacement="select_background"/> + <ligature sequence="i n s e r t _ b a c k g r o u n d" replacement="insert_background"/> + <ligature sequence="n e w _ p o i n t _ o n _ p a t h" replacement="new_point_on_path"/> + <ligature sequence="d e l e t e _ b a c k g r o u n d" replacement="delete_background"/> <ligature sequence="o r i e n t a t i o n _ a r r o w" replacement="orientation_arrow"/> - <ligature sequence="d e l e t e _ b a c k g r o u n d" replacement="delete_background"/> - <ligature sequence="n e w _ p o i n t _ o n _ p a t h" replacement="new_point_on_path"/> - <ligature sequence="i n s e r t _ b a c k g r o u n d" replacement="insert_background"/> - <ligature sequence="s e l e c t _ b a c k g r o u n d" replacement="select_background"/> - <ligature sequence="s t r o k e _ t o _ o u t l i n e" replacement="stroke_to_outline"/> - <ligature sequence="c u r v e _ o r i e n t a t i o n" replacement="curve_orientation"/> + <ligature sequence="o r i e n t a t i o n _ b o t h" replacement="orientation_both"/> + <ligature sequence="q u a d r a t i c _ p o i n t s" replacement="quadratic_points"/> <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="r e s i z e _ o v e r v i e w" replacement="resize_overview"/> - <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="s v g _ t o _ b i r d f o n t" replacement="svg_to_birdfont"/> - <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="z o o m _ b o u n d a r i e s" replacement="zoom_boundaries"/> + <ligature sequence="s h o w _ b a c k g r o u n d" replacement="show_background"/> + <ligature sequence="f l i p _ h o r i z o n t a l" replacement="flip_horizontal"/> + <ligature sequence="m o v e _ b a c k g r o u n d" replacement="move_background"/> + <ligature sequence="l i n e _ c a p _ s q u a r e" replacement="line_cap_square"/> + <ligature sequence="r e s i z e _ o v e r v i e w" replacement="resize_overview"/> <ligature sequence="f i l l _ o p e n _ p a t h" replacement="fill_open_path"/> - <ligature sequence="s k e w _ o v e r v i e w" replacement="skew_overview"/> - <ligature sequence="l a y e r _ v i s i b l e" replacement="layer_visible"/> - <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"/> - <ligature sequence="d e l e t e _ b u t t o n" replacement="delete_button"/> - <ligature sequence="c o n v e r t _ p o i n t" replacement="convert_point"/> - <ligature sequence="d o u b l e _ p o i n t s" replacement="double_points"/> - <ligature sequence="k e r n i n g _ c l a s s" replacement="kerning_class"/> + <ligature sequence="u p d a t e _ w e b v i e w" replacement="update_webview"/> + <ligature sequence="c u t _ b a c k g r o u n d" replacement="cut_background"/> + <ligature sequence="i n s e r t _ u n i c h a r" replacement="insert_unichar"/> + <ligature sequence="l i n e _ c a p _ r o u n d" replacement="line_cap_round"/> + <ligature sequence="r i g h t _ t o _ l e f t" replacement="right_to_left"/> <ligature sequence="a d d _ n e w _ t h e m e" replacement="add_new_theme"/> - <ligature sequence="l a y e r _ h i d d e n" replacement="layer_hidden"/> - <ligature sequence="y _ c o o r d i n a t e" replacement="y_coordinate"/> - <ligature sequence="x _ c o o r d i n a t e" replacement="x_coordinate"/> - <ligature sequence="c u b i c _ p o i n t s" replacement="cubic_points"/> - <ligature sequence="r e v e r s e _ p a t h" replacement="reverse_path"/> - <ligature sequence="e x p o r t _ f o n t s" replacement="export_fonts"/> + <ligature sequence="k e r n i n g _ c l a s s" replacement="kerning_class"/> + <ligature sequence="d o u b l e _ p o i n t s" replacement="double_points"/> + <ligature sequence="c o n v e r t _ p o i n t" replacement="convert_point"/> + <ligature sequence="d e l e t e _ b u t t o n" replacement="delete_button"/> + <ligature sequence="f l i p _ v e r t i c a l" replacement="flip_vertical"/> + <ligature sequence="d r o p d o w n _ m e n u" replacement="dropdown_menu"/> + <ligature sequence="r e s i z e _ h a n d l e" replacement="resize_handle"/> + <ligature sequence="l i n e _ c a p _ b u t t" replacement="line_cap_butt"/> + <ligature sequence="l a y e r _ v i s i b l e" replacement="layer_visible"/> + <ligature sequence="s k e w _ o v e r v i e w" replacement="skew_overview"/> <ligature sequence="a p p l y _ s t r o k e" replacement="apply_stroke"/> - <ligature sequence="f u l l _ h e i g h t" replacement="full_height"/> - <ligature sequence="s h o w _ l a y e r s" replacement="show_layers"/> - <ligature sequence="b e z i e r _ t o o l" replacement="bezier_tool"/> - <ligature sequence="r i g h t _ a r r o w" replacement="right_arrow"/> - <ligature sequence="b e z i e r _ l i n e" replacement="bezier_line"/> - <ligature sequence="c r e a t e _ l i n e" replacement="create_line"/> - <ligature sequence="s p i n _ b u t t o n" replacement="spin_button"/> + <ligature sequence="e x p o r t _ f o n t s" replacement="export_fonts"/> + <ligature sequence="r e v e r s e _ p a t h" replacement="reverse_path"/> + <ligature sequence="c u b i c _ p o i n t s" replacement="cubic_points"/> + <ligature sequence="x _ c o o r d i n a t e" replacement="x_coordinate"/> + <ligature sequence="y _ c o o r d i n a t e" replacement="y_coordinate"/> + <ligature sequence="l a y e r _ h i d d e n" replacement="layer_hidden"/> <ligature sequence="m o v e _ c a n v a s" replacement="move_canvas"/> - <ligature sequence="c l o s e _ p a t h" replacement="close_path"/> - <ligature sequence="l e f t _ a r r o w" replacement="left_arrow"/> - <ligature sequence="h e l p _ l i n e s" replacement="help_lines"/> - <ligature sequence="m o v e _ l a y e r" replacement="move_layer"/> - <ligature sequence="s e l e c t _ a l l" replacement="select_all"/> - <ligature sequence="p o i n t _ t o o l" replacement="point_tool"/> + <ligature sequence="s p i n _ b u t t o n" replacement="spin_button"/> + <ligature sequence="c r e a t e _ l i n e" replacement="create_line"/> + <ligature sequence="b e z i e r _ l i n e" replacement="bezier_line"/> + <ligature sequence="r i g h t _ a r r o w" replacement="right_arrow"/> + <ligature sequence="b e z i e r _ t o o l" replacement="bezier_tool"/> + <ligature sequence="s h o w _ l a y e r s" replacement="show_layers"/> + <ligature sequence="f u l l _ h e i g h t" replacement="full_height"/> <ligature sequence="f u l l _ g l y p h" replacement="full_glyph"/> - <ligature sequence="a l t e r n a t e" replacement="alternate"/> - <ligature sequence="l o c k _ g r i d" replacement="lock_grid"/> - <ligature sequence="s a v e _ f o n t" replacement="save_font"/> - <ligature sequence="i n f o _ i c o n" replacement="info_icon"/> - <ligature sequence="s h o w _ g r i d" replacement="show_grid"/> - <ligature sequence="a u t o t r a c e" replacement="autotrace"/> - <ligature sequence="u n d o _ t o o l" replacement="undo_tool"/> - <ligature sequence="t i e _ p o i n t" replacement="tie_point"/> - <ligature sequence="s y m m e t r i c" replacement="symmetric"/> - <ligature sequence="z o o m _ t o o l" replacement="zoom_tool"/> - <ligature sequence="r e c t a n g l e" replacement="rectangle"/> - <ligature sequence="t t f _ u n i t s" replacement="ttf_units"/> - <ligature sequence="m e n u _ i c o n" replacement="menu_icon"/> - <ligature sequence="o p e n _ f o n t" replacement="open_font"/> - <ligature sequence="a d d _ l a y e r" replacement="add_layer"/> + <ligature sequence="p o i n t _ t o o l" replacement="point_tool"/> + <ligature sequence="s e l e c t _ a l l" replacement="select_all"/> + <ligature sequence="m o v e _ l a y e r" replacement="move_layer"/> + <ligature sequence="h e l p _ l i n e s" replacement="help_lines"/> + <ligature sequence="l e f t _ a r r o w" replacement="left_arrow"/> + <ligature sequence="c l o s e _ p a t h" replacement="close_path"/> <ligature sequence="t r a n s f o r m" replacement="transform"/> - <ligature sequence="s e t t i n g s" replacement="settings"/> - <ligature sequence="z o o m _ o u t" replacement="zoom_out"/> - <ligature sequence="r o t a t i o n" replacement="rotation"/> - <ligature sequence="p e n _ t o o l" replacement="pen_tool"/> - <ligature sequence="z o o m _ 1 _ 1" replacement="zoom_1_1"/> - <ligature sequence="p r o g r e s s" replacement="progress"/> + <ligature sequence="a d d _ l a y e r" replacement="add_layer"/> + <ligature sequence="o p e n _ f o n t" replacement="open_font"/> + <ligature sequence="m e n u _ i c o n" replacement="menu_icon"/> + <ligature sequence="t t f _ u n i t s" replacement="ttf_units"/> + <ligature sequence="r e c t a n g l e" replacement="rectangle"/> + <ligature sequence="z o o m _ t o o l" replacement="zoom_tool"/> + <ligature sequence="s y m m e t r i c" replacement="symmetric"/> + <ligature sequence="t i e _ p o i n t" replacement="tie_point"/> + <ligature sequence="u n d o _ t o o l" replacement="undo_tool"/> + <ligature sequence="a u t o t r a c e" replacement="autotrace"/> + <ligature sequence="s h o w _ g r i d" replacement="show_grid"/> + <ligature sequence="i n f o _ i c o n" replacement="info_icon"/> + <ligature sequence="s a v e _ f o n t" replacement="save_font"/> + <ligature sequence="l o c k _ g r i d" replacement="lock_grid"/> + <ligature sequence="a l t e r n a t e" replacement="alternate"/> <ligature sequence="n e w _ f o n t" replacement="new_font"/> + <ligature sequence="p r o g r e s s" replacement="progress"/> + <ligature sequence="z o o m _ 1 _ 1" replacement="zoom_1_1"/> + <ligature sequence="p e n _ t o o l" replacement="pen_tool"/> + <ligature sequence="r o t a t i o n" replacement="rotation"/> + <ligature sequence="z o o m _ o u t" replacement="zoom_out"/> + <ligature sequence="s e t t i n g s" replacement="settings"/> <ligature sequence="z o o m _ i n" replacement="zoom_in"/> - <ligature sequence="h e i g h t" replacement="height"/> - <ligature sequence="r e s i z e" replacement="resize"/> - <ligature sequence="c i r c l e" replacement="circle"/> <ligature sequence="s e a r c h" replacement="search"/> - <ligature sequence="t h e m e" replacement="theme"/> - <ligature sequence="w i d t h" replacement="width"/> - <ligature sequence="t r a c k" replacement="track"/> + <ligature sequence="c i r c l e" replacement="circle"/> + <ligature sequence="r e s i z e" replacement="resize"/> + <ligature sequence="h e i g h t" replacement="height"/> <ligature sequence="c l o s e" replacement="close"/> - <ligature sequence="s k e w" replacement="skew"/> - <ligature sequence="m o v e" replacement="move"/> - <ligature sequence="p r e v" replacement="prev"/> - <ligature sequence="n e x t" replacement="next"/> + <ligature sequence="t r a c k" replacement="track"/> + <ligature sequence="w i d t h" replacement="width"/> + <ligature sequence="t h e m e" replacement="theme"/> <ligature sequence="s t o p" replacement="stop"/> + <ligature sequence="n e x t" replacement="next"/> + <ligature sequence="p r e v" replacement="prev"/> + <ligature sequence="m o v e" replacement="move"/> + <ligature sequence="s k e w" replacement="skew"/> <kerning left="settings" right="l" hadjustment="3.8289794922" /> </font>