The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Import SVG files for color fonts

Changes made to libbirdfont/Menu.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/Menu.vala +++ libbirdfont/Menu.vala @@ -287,17 +287,35 @@ MenuItem import_svg = add_menu_item (t_("Import SVG file"), "import svg file", "Glyph"); import_svg.action.connect (() => { - SvgParser.import (); + SvgParser.import (SvgType.REGULAR); show_menu = false; }); export_menu.items.add (import_svg); - + MenuItem import_svg_folder = add_menu_item (t_("Import SVG folder"), "import svg folder", ""); import_svg_folder.action.connect (() => { - SvgParser.import_folder (); + SvgParser.import_folder (SvgType.REGULAR); show_menu = false; }); export_menu.items.add (import_svg_folder); + + MenuItem import_color_svg; + import_color_svg = add_menu_item (t_("Import SVG file") + ", " + t_("color"), + "import svg file color", "Glyph"); + import_color_svg.action.connect (() => { + SvgParser.import (SvgType.COLOR); + show_menu = false; + }); + export_menu.items.add (import_color_svg); + + MenuItem import_svg_color_folder; + import_svg_color_folder = add_menu_item (t_("Import SVG folder") + ", " + t_("color"), + "import svg folder color", ""); + import_svg_color_folder.action.connect (() => { + SvgParser.import_folder (SvgType.COLOR); + show_menu = false; + }); + export_menu.items.add (import_svg_color_folder); MenuItem import_background_image = add_menu_item (t_("Import Background Image"), "import background image"); import_background_image.action.connect (() => {