SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

Font size provided by API is always a value of 19.352941

Open noahbald opened this issue 3 years ago • 0 comments

Not sure why this is happening, but when I try to get the fontSize from any text layer it always seems to have the same value of 19.352941, regardless of the actual font size.

Here is what the structure of my code is similar to.

const layer = document.getLayerWithID(id)
if (layer && layer.type === sketch.Types.Text) {
  console.log({fontSize: layer.style.fontSize})
}
image image

==== Using sketch Version 87.1 (144594) package.json engine sketch = ">=3.0"

noahbald avatar May 19 '22 02:05 noahbald