The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Style for SVG rect

These changes was commited to the Birdfont repository Wed, 14 Oct 2015 08:19:40 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Wed, 14 Oct 2015 08:19:40 +0000]

Updated Files

libbirdfont/SvgParser.vala
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -576,6 +576,8 @@ BezierPoints[] bezier_points; Glyph g; PathList npl = new PathList (); + SvgStyle style = new SvgStyle (); + bool hidden = false; x = 0; y = 0; @@ -598,6 +600,18 @@ if (attr.get_name () == "height") { y2 = -parse_double (attr.get_content ()); } + + if (attr.get_name () == "style") { + style = SvgStyle.parse (attr.get_content ()); + } + + if (attr.get_name () == "display" && attr.get_content () == "none") { + hidden = true; + } + } + + if (hidden) { + return; } x2 += x; @@ -647,6 +661,7 @@ } } + style.apply (npl); pl.paths.append (npl); }