Incorrect handling of SVG stroke:none
Austin Clements <[email protected]>
| Newsgroups | gmane.comp.fonts.fontforge.devel |
|---|---|
| Message-ID | <[email protected]> |
When importing an SVG into a glyph, FontForge incorrectly attempts to
stroke paths that have a stroke of "none". (This is particularly
unfortunate because Inkscape always includes "stroke:none" in path
styles, even though this is the default value for "stroke".)
To reproduce:
1) Create a new font
2) Enter the glyph editor
3) File > Import the below SVG
4) Enable grid view and observe that the outline is stroked, not filled.
Or zoom way in on one of the control points, and you'll see that the
outline was imported as a very thin stroke.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" version="1.1">
<path d="m 64,72 0,864 864,0 0,-864 z"
style="stroke:none" />
</svg>
Importing reports several "Failed to parse color" warnings and shows a
dialog warning about the "remove overlap" function (even though there
are no overlaps).
If you add a "fill:black" to the style (which is the default value of
fill), things get even weirder: I think FontForge is attempting to both
fill and stroke the outline. But if you remove the "stroke:none" or
remove the style entirely, then FontForge imports the outline correctly
and doesn't report any warnings.
I am running FontForge 20120731-ML from Debian jessy (testing). Let me
know if any additional information would be useful.
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk