You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here a straight line into Figma by using the VECTOR type:
The corresponding Figma SVG path is: M0 0.5L34.5 0.5L34.5 -0.5L0 -0.5L0 0.5Z
It will result into a rectangle into Penpot:
This is due to svg-path-parser that will analyze the raw Figma SVG path, not understanding the shape was initially created with a strokeWeight (no matter the value). The main issue is to modify the shape, you need to manage close points so the shape stay a line. And it's even worse with curves because you need to also have the same angle for the both curve points.
I'm not sure of all possible cases from a SVG path but:
either it's always making a round for each "sub-shape" into the SVG path, and so we could skip the half of points (first or last ones)
or by using strokeWeight and strokeAlign from Figma, we could in a way try to match each point with it's "clone one" to merge them
(in both cases, strokeWeight and strokeAlign would help shifting the position of points since outlines where used initially, not the original centered line)
EDIT: I think by doing this, shape having a "close path" will have their fill property working, there will be not necessary to have 2 shapes inside a group, one for the stroke, one for the filling.
Hi there @sneko. I was not able to reproduce this by making lines in Figma. Could you please share a simple figma file with this example in which you're encountering this issue?
Hi,
Here a straight line into Figma by using the
VECTOR
type:The corresponding Figma SVG path is:
M0 0.5L34.5 0.5L34.5 -0.5L0 -0.5L0 0.5Z
It will result into a rectangle into Penpot:
This is due to
svg-path-parser
that will analyze the raw Figma SVG path, not understanding the shape was initially created with astrokeWeight
(no matter the value). The main issue is to modify the shape, you need to manage close points so the shape stay a line. And it's even worse with curves because you need to also have the same angle for the both curve points.I'm not sure of all possible cases from a SVG path but:
strokeWeight
andstrokeAlign
from Figma, we could in a way try to match each point with it's "clone one" to merge them(in both cases,
strokeWeight
andstrokeAlign
would help shifting the position of points since outlines where used initially, not the original centered line)EDIT: I think by doing this, shape having a "close path" will have their
fill
property working, there will be not necessary to have 2 shapes inside agroup
, one for the stroke, one for the filling.EDIT2: related https://forum.figma.com/t/rest-api-exposing-svg-real-strokes/42387 on Figma side but we no solution?
The text was updated successfully, but these errors were encountered: