The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Visibility for layers in SVG import

These changes was commited to the Birdfont repository Mon, 18 May 2015 12:55:20 +0000.

Contributing

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

Updated Files

libbirdfont/SvgParser.vala
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -193,7 +193,24 @@ private void parse_layer (Tag tag, Layer pl) { Layer layer; + bool hidden = false; + + foreach (Attribute attr in tag.get_attributes ()) { + if (attr.get_name () == "display" && attr.get_content () == "none") { + hidden = true; + } + + if (attr.get_name () == "visibility" + && (attr.get_content () == "hidden" + || attr.get_content () == "collapse")) { + hidden = true; + } + } + if (hidden) { + return; + } + foreach (Tag t in tag) { if (t.get_name () == "path") { parse_path (t, pl);