How can I set font weight through script?

Hello. Straight to the point, I just can’t figure out how I can set the font weight through script (I’m using Fusion to create UI). I’m not sure if it’s possible or not as there’s no other posts regarding my issue. Thanks for any sort of help.

2 Likes

I believe you do something like this:

TextLabel.FontFace.Weight = Enum.FontWeight.Bold
2 Likes

I’m pretty sure it works, but just so you know, I’m using Fusion to create my UIs.

Huh, I’m not sure as i have never heard to this

FontFace holds a Font Object

TextLabel.FontFace = Font.new("rbxasset://fonts/families/Arial.json", Enum.FontWeight.Bold, Enum.FontStyle.Normal)

This would work.

Instead of having to put the .json directly, you can just do this

Font.fromEnum(Enum.Font.Arial).Family

1 Like

I found that out a few days ago, but still thanks a lot!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.