Automatically generate a list of all Roblox fonts, including local and cloud fonts.
You'll need to have Aftman installed. This is a toolchain manager and will automatically install the required tools for this project (Lune and StyLua).
Once you have Aftman installed, you can run the following command to install the required tools:
aftman install
Then, you can run the following command to generate the font list:
lune generate
The font list will be written to build/FontList.lua
in the current directory, and comes with
built-in type definitions.
Here's a preview of the generated font list:
--!strict
-- This file is automatically generated by Font List Generate
-- by @cxmeel (cxmeels). Do not edit this file manually.
export type IFont = {
ContentUri: string,
Name: string,
Aliases: { string },
Weights: { Enum.FontWeight },
Styles: { Enum.FontStyle },
}
local fonts: { IFont } = {
-- Local fonts --
{
Name = "Accanthis ADF Std",
Aliases = {},
ContentUri = "rbxasset://fonts/families/AccanthisADFStd.json",
Weights = { Enum.FontWeight.Regular },
Styles = { Enum.FontStyle.Normal },
},
{
Name = "Amatic SC",
Aliases = {},
ContentUri = "rbxasset://fonts/families/AmaticSC.json",
Weights = { Enum.FontWeight.Regular, Enum.FontWeight.Bold },
Styles = { Enum.FontStyle.Normal },
},
{
Name = "Arial",
Aliases = {},
ContentUri = "rbxasset://fonts/families/Arial.json",
Weights = { Enum.FontWeight.Regular, Enum.FontWeight.Bold },
Styles = { Enum.FontStyle.Normal },
},
-- Cloud fonts --
...
}
return fonts