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
When creating a new Glyph, I expected the path's fill, stroke, and strokeWidth properties to be passed on to the Glyph.path property.
Current Behavior
After setting fill, stroke, and strokeWidth on a path and then adding it to a new glyph, logging glyph.getPath().path returns a path with default fill, stroke, and strokeWidth properties.
I have this same problem. Did you end up finding a solution for it?
When I console.log(bGlyph) without .getPath() it does have the right settings in the path but they somehow get lost somewhere?
While a glyph is based on a path, it doesn't make sense for me to have different styles for each glyph. getPath() doesn't simply return the Glyph's path property, but builds a new path that you can position, in a specific font size, and even using the hinting information from a different font. So I wouldn't expect the Glyph to retain the styling information.
You can still get the path's styling from glyph.path directly. And once #623 is implemented via #626, you'll be able to provide the styles back to the new Path using the options:
What we could do to make this a bit more straight-forward is implement a new option like options.retainStyles that will copy the base path's styles before applying any overrides via options.style. But that would have to wait for #626.
Expected Behavior
When creating a new Glyph, I expected the path's
fill
,stroke
, andstrokeWidth
properties to be passed on to theGlyph.path
property.Current Behavior
After setting
fill
,stroke
, andstrokeWidth
on a path and then adding it to a new glyph, loggingglyph.getPath().path
returns a path with defaultfill
,stroke
, andstrokeWidth
properties.Steps to Reproduce
console.log
returns:Environment
The text was updated successfully, but these errors were encountered: