sketch-hq/SketchAPI

APIs missing: Outline

matteogratton opened this issue · 1 comments

The outline function is not exposed.
In order to outline a layer, we should refer to the private APIs. Example outlying a text layer:
let outline = layer.sketchObject.layersByConvertingToOutlines();

let outlineText = sketch.fromNative(outline[0]);

It would be nice to have something like:

let outlineText = layer.outline();

We need this too. Fonts can't easily be embedded inside SVGs. So we need to outline the text before exporting. But we don't want to save the outline, so this is better as an automated API step, to avoid ruining the original sketch document.