Typography - A simple way to manage RichText


Github · Latest Release · Wally Page

Typography replaces Roblox RichText’s confusing naming and manual formatting with a simple, chainable API for styling text consistently in your projects.

:warning: Typography is in beta. It was originally built for one of my personal projects and is still a work in progress. If you have any issues, questions, or feedback, feel free to let me know.

Installation

Wally

Wally is a CLI package manager for Roblox by UpliftGames

Add Typography to your wally.toml:

[dependencies]

Typography = "metatablesnow/typography@0.2.0"

Then, install:

wally install

Manual

Install the .rbxm or .lua file from the latest release and import it into your project.

Usage

Typography exposes all RichText formatting options as easy-to-read functions:

local Typography = require(path.to.Typography)

For example, if you want text to be underlined, bold, bright green, and using the “Bangers” font:

local Typography = require(path.to.Typography)

local Underline = Typography.Underline
local Bold = Typography.Bold
local Color = Typography.Color
local FontFace = Typography.FontFace

TextLabel.Text = 
	Underline(
		Bold(
			Color(
				FontFace("Hello, World", "Bangers"),
				Color3.fromRGB(0, 255, 0)
			)
		)
	)
6 Likes

This looks like it can be useful for people who don’t know about RichText formatting all that much, but with RichText having clear stated documentation, i couldn’t see my self personally using this. I’m not saying it’s a bad idea, you just don’t have a great target audience here.

1 Like

For me this is really good as I like using richtext but hate using these things “<>” as I just feel there not ment for Roblox but this definitely does make life a whole lot easier

1 Like

i agree that plain strings works just fine:

richTextString = '<font color="#FFFFFF">Text</font>

the main issue i was trying to solve isnt really about understanding richtext itself, but more about the messiness that comes from dynamically building rich text strings. when youre using variables for things like font color, stroke, transparency, etc. it quickly becomes hard to read and maintain:

local richTextString = '<font color="'..color..'"><stroke color="'..strokeColor..'" joins="miter" thickness="2" transparency="0.25"</stroke></font>'

thats where i think this module becomes helpful, not necessarily for beginners but for devs who are building more complex or reusable UI components and want to avoid that kind of string concatenation clutter.

I could just be the only person that feels that way, however i’m more used to the html format style they have in place so i don’t necessarily mind it, i’m used to writing like that in web development.