With Font you can set several properties at once
Open in Framer

With .font, you can set a bunch of properties at once, in one single line.

These are the possible properties, in their correct order:

font: "fontStyle fontWeight fontSize/lineHeight fontFamily"

But only two are required: fontSize and fontFamily.

textA = new TextLayer
    font: "32px -apple-system"

(Yes, you have to write px after the size, but, as with any fontSize value in Framer, the value is actually in ‘points.’)

The remaining properties are optional. Here’s an example with all possible properties:

textA = new TextLayer
    font: "italic 400 25px/1.5 Menlo"

(Don’t forget to type a / before the line height.)

Leave a Reply