Skip to main content
This topic has been closed for replies.
Best answer by tank666

The fontWeight property is read-only. To change the fontWeight, you need to change fontName.style using the above methods.

4 replies

tank666
January 10, 2024

Yes, of course you can change the font style. You need to use the setRangeFontName or setRangeTextStyleId methods.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Lucas_Miqueias
New Member
January 10, 2024

How?

Because in documentation

setRageFontName wait font name.
setRageTextStyleId wait a string.

I need to change font-weight in a range.

tank666
tank666Answer
January 10, 2024

The fontWeight property is read-only. To change the fontWeight, you need to change fontName.style using the above methods.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Lucas_Miqueias
New Member
January 11, 2024

Thank you!

This works for me.