-
Notifications
You must be signed in to change notification settings - Fork 515
Open
Description
Expected Behavior
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.
Steps to Reproduce
const bPath = new Path();
bPath.moveTo(0, 300);
bPath.lineTo(300, 600);
bPath.lineTo(600, 300);
bPath.fill = null;
bPath.stroke = 'red';
bPath.strokeWidth = 50;
const bGlyph = new Glyph({
name: 'B',
unicode: 65,
advanceWidth: 650,
path: bPath
});
console.log(bPath, bGlyph.getPath());
console.log
returns:
Object { commands: (3) […], fill: null, stroke: "red", strokeWidth: 50 }
Object { commands: (3) […], fill: "black", stroke: null, strokeWidth: 1 }
Environment
- Version used: latest
- Font used: n/a
- Browser Name and version: FF 99
- Operating System and version (desktop or mobile): macOS
- Link to your project: n/a
Metadata
Metadata
Assignees
Labels
No labels