Studio | Text Feature | How to make your text BOLD

How can I make the Text “Bold”.with the new Roblox Update I am unsure if anyone has any suggestions.

game.Workspace.Fire_Control.Control_Global.Fire_Control.Fire_Call_Remote.OnClientEvent:Connect(function()	
	local Call = Instance.new("Frame")
	Call.Size = UDim2.new(0, 142, 0, 15)
	Call.BackgroundColor3 = Color3.new(1, 1, 1)
	Call.BorderSizePixel = 1
	Call.BorderColor3 = Color3.new(0, 0, 0)
	Call.Parent = script.Parent
	Call.Name = (game.Workspace.Fire_Control.Control_Global.Fire_Control.Fire_Call_Number_Folder.Value .. "Callout_Number")
	local Call_Status = Instance.new("TextLabel")
	Call_Status.Position = UDim2.new(-0.6, 0,-1.3, 0)
	Call_Status.Size = UDim2.new(0, 200, 0, 50)
	Call_Status.BackgroundTransparency = 1
	Call_Status.BorderSizePixel	= 0
	Call_Status.Parent = Call
	Call_Status.Font = "SourceSans"
	**Call_Status.FontFace.Style.Name = "Bold"**
	Call_Status.Text = "UAC"
end)
  • Arestformoney
  • Scripting Developer
    -Module Scripter
3 Likes

If the RichText property is enabled on a text GUI, you can use HTML codes to change It’s appearance. In this case, You need to place a <b> before the text and a </b> after the text.

As an example, “<b>bold text</b> now normal” will appear in a RichText enabled GUI like “bold text now normal”

1 Like

Ok. is the any way to do it through the actual FontFace side of it?

1 Like

As simple as this:

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

or this:

local newFont = Font.new("rbxasset://fonts/families/SourceSansPro.json")
newFont.Weight = Enum.FontWeight.Bold
TextLabel.FontFace = newFont

Also note that new Font constructor ‘fromName’ will be added soon so you’ll only need to write the font name.

@OP is trying to change a font via script.

3 Likes

I don’t know about how to use FontFaces, and I don’t think you’ll need it

1 Like

The new update has a bold and italic button…
I don’t know why it is hard to understand

1 Like

Why would you need to do that if they released a update where you can just click a button and boom, your text is italic and/or bold.

1 Like

To create GUIs within scripts, as the script clearly shows

1 Like

Okay…
Honestly, it doesn’t make sense to me.

1 Like

Sometimes, you need to create some instances via script. If you were to create a TextLabel, the only way to change a font would be to use the Font global. It is also possible that you’ll have no other way to create instances other than using a script (when you’re making UI with Roact, for example).

2 Likes

This also works but makes the whole text bold instead of only a part of it

Yeah, if you want more control over how your text is rendered, RichText is what you’re looking for. But it is also possible to use RichText alongside with the new font system:

TextLabel.FontFace = Font.new("rbxasset://fonts/families/Arial.json")
TextLabel.Text = "<b>text</b>"
2 Likes

You can provide Weight and Style with Font.new() and assign it to FontFace

The solution for this post should have actually been this:

Setting a text to RichText works as well, but if you’re doing it for a player’s chat or something. You’d have to note that they can add the other RichText tags as well to it.