diff --git a/packages/lib-roblox/scripts/font_enum_map.luau b/packages/lib-roblox/scripts/font_enum_map.luau index e3fe94d..eff5d16 100644 --- a/packages/lib-roblox/scripts/font_enum_map.luau +++ b/packages/lib-roblox/scripts/font_enum_map.luau @@ -4,65 +4,90 @@ local contents = "" contents ..= "\ntype FontData = (&'static str, FontWeight, FontStyle);\n" +local ENUM_IMPLEMENTATION = [[ + +#[derive(Debug, Clone, Copy, PartialEq)] +pub(crate) enum <> { + <> +} + +impl <> { + pub fn as_<>(&self) -> <> { + match self { + <> + } + } + + pub fn from_<>(n: <>) -> Option { + match n { + <> + _ => None, + } + } +} + +impl std::str::FromStr for <> { + type Err = &'static str; + fn from_str(s: &str) -> Result { + match s { + <> + _ => Err("Unknown <>"), + } + } +} + +impl std::fmt::Display for <> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + <> + } + ) + } +} + +]] + -- FontWeight enum and implementation local function makeRustEnum(enum, numType: string) local name = string.gsub(tostring(enum), "^Enum.", "") - -- TODO: Use FromStr and AsStr traits for name functions - -- TODO: Match the naming convention that rbx-dom has for number/value functions + local enumNames = "" + local enumToNumbers = "" + local numbersToEnum = "" + local stringsToEnum = "" + local enumToStrings = "" - local result = "" + for _, enum in enum:GetEnumItems() do + enumNames ..= `\n{enum.Name},` + enumToNumbers ..= `\nSelf::{enum.Name} => {enum.Value},` + numbersToEnum ..= `\n{enum.Value} => Some(Self::{enum.Name}),` + stringsToEnum ..= `\n"{enum.Name}" => Ok(Self::{enum.Name}),` + enumToStrings ..= `\nSelf::{enum.Name} => "{enum.Name}",` + end - result ..= "\n#[derive(Debug, Clone, PartialEq)]" - result ..= "\npub(crate) enum " .. name .. " {" - for _, enum in enum:GetEnumItems() do - result ..= string.format("\n %s,", enum.Name) - end - result ..= "\n}\n" + local mappings: { [string]: string } = { + ["<>"] = name, + ["<>"] = numType, + ["<>"] = enumNames, + ["<>"] = enumToNumbers, + ["<>"] = enumToStrings, + ["<>"] = numbersToEnum, + ["<>"] = stringsToEnum, + } - result ..= "\nimpl " .. name .. " {" - result ..= "\n pub fn into_name(self) -> &'static str {" - result ..= "\n match self {" - for _, enum in enum:GetEnumItems() do - result ..= string.format('\n Self::%s => "%s",', enum.Name, enum.Name) + local result = ENUM_IMPLEMENTATION + for key, replacement in mappings do + result = string.gsub(result, "(\t*)" .. key, function(tabbing) + local spacing = string.gsub(tabbing, "\t", " ") + local inner = string.gsub(replacement, "\n", "\n" .. spacing) + inner = string.gsub(inner, "^\n+", "") + return inner + end) end - result ..= "\n }" - result ..= "\n }" - result ..= "\n" - result ..= "\n pub fn from_name(name: impl AsRef) -> Option {" - result ..= "\n match name.as_ref() {" - for _, enum in enum:GetEnumItems() do - result ..= string.format('\n "%s" => Some(Self::%s),', enum.Name, enum.Name) - end - result ..= "\n _ => None," - result ..= "\n }" - result ..= "\n }" - result ..= "\n" - result ..= "\n pub fn into_num(self) -> " .. numType .. " {" - result ..= "\n match self {" - for _, enum in enum:GetEnumItems() do - result ..= string.format("\n Self::%s => %d,", enum.Name, enum.Value) - end - result ..= "\n }" - result ..= "\n }" - result ..= "\n" - result ..= "\n pub fn from_num(num: " .. numType .. ") -> Option {" - result ..= "\n match num {" - for _, enum in enum:GetEnumItems() do - result ..= string.format("\n %d => Some(Self::%s),", enum.Value, enum.Name) - end - result ..= "\n _ => None," - result ..= "\n }" - result ..= "\n }" - result ..= "\n}\n" - - result ..= "\nimpl fmt::Display for " .. name .. " {" - result ..= "\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {" - result ..= '\n write!(f, "{}", self.into_name())' - result ..= "\n }" - result ..= "\n}" - return result end @@ -74,25 +99,35 @@ contents ..= "\n" -- Font constant map from enum to font data --- TODO: Fix formatting issues of output here - local longestNameLen = 0 +local longestFamilyLen = 0 +local longestWeightLen = 0 for _, enum in Enum.Font:GetEnumItems() do longestNameLen = math.max(longestNameLen, #enum.Name) + if enum ~= Enum.Font.Unknown then + local font = Font.fromEnum(enum) + longestFamilyLen = math.max(longestFamilyLen, #font.Family) + longestWeightLen = math.max(longestWeightLen, #font.Weight.Name) + end end contents ..= "\n#[rustfmt::skip]\nconst FONT_ENUM_MAP: &[(&str, Option)] = &[\n" for _, enum in Enum.Font:GetEnumItems() do if enum == Enum.Font.Unknown then - contents ..= ' ("Unknown", None),\n' + contents ..= string.format( + ' ("Unknown",%s None),\n', + string.rep(" ", longestNameLen - #enum.Name) + ) else local font = Font.fromEnum(enum) contents ..= string.format( - ' ("%s",%s Some(("%s", FontWeight::%s, FontStyle::%s))),\n', + ' ("%s",%s Some(("%s",%s FontWeight::%s,%s FontStyle::%s))),\n', enum.Name, string.rep(" ", longestNameLen - #enum.Name), font.Family, + string.rep(" ", longestFamilyLen - #font.Family), font.Weight.Name, + string.rep(" ", longestWeightLen - #font.Weight.Name), font.Style.Name ) end diff --git a/packages/lib-roblox/src/datatypes/types/font.rs b/packages/lib-roblox/src/datatypes/types/font.rs index 202ced4..ff54e82 100644 --- a/packages/lib-roblox/src/datatypes/types/font.rs +++ b/packages/lib-roblox/src/datatypes/types/font.rs @@ -24,13 +24,11 @@ impl Font { FONT_ENUM_MAP .iter() .find(|props| props.0 == material_enum_item.name && props.1.is_some()) - .map(|props| { - let props = props.1.as_ref().unwrap().clone(); - Font { - family: props.0.to_string(), - weight: props.1, - style: props.2, - } + .map(|props| props.1.as_ref().unwrap()) + .map(|props| Font { + family: props.0.to_string(), + weight: props.1, + style: props.2, }) } @@ -64,7 +62,7 @@ impl LuaUserData for Font { fn add_fields<'lua, F: LuaUserDataFields<'lua, Self>>(fields: &mut F) { fields.add_field_method_get("Family", |_, this| Ok(this.family.clone())); // TODO: Getters & setters for weight, style - fields.add_field_method_get("Bold", |_, this| Ok(this.weight.clone().into_num() >= 600)); + fields.add_field_method_get("Bold", |_, this| Ok(this.weight.clone().as_u16() >= 600)); fields.add_field_method_set("Bold", |_, this, value: bool| { if value { this.weight = FontWeight::Bold; @@ -110,25 +108,25 @@ impl From for RbxFont { impl From for FontWeight { fn from(v: RbxFontWeight) -> Self { - FontWeight::from_num(v.as_u16()).expect("Missing font weight") + FontWeight::from_u16(v.as_u16()).expect("Missing font weight") } } impl From for RbxFontWeight { fn from(v: FontWeight) -> Self { - RbxFontWeight::from_u16(v.into_num()).expect("Missing rbx font weight") + RbxFontWeight::from_u16(v.as_u16()).expect("Missing rbx font weight") } } impl From for FontStyle { fn from(v: RbxFontStyle) -> Self { - FontStyle::from_num(v.as_u8()).expect("Missing font weight") + FontStyle::from_u8(v.as_u8()).expect("Missing font weight") } } impl From for RbxFontStyle { fn from(v: FontStyle) -> Self { - RbxFontStyle::from_u8(v.into_num()).expect("Missing rbx font weight") + RbxFontStyle::from_u8(v.as_u8()).expect("Missing rbx font weight") } } @@ -142,7 +140,7 @@ impl From for RbxFontStyle { type FontData = (&'static str, FontWeight, FontStyle); -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] pub(crate) enum FontWeight { Thin, ExtraLight, @@ -156,36 +154,7 @@ pub(crate) enum FontWeight { } impl FontWeight { - pub fn into_name(self) -> &'static str { - match self { - Self::Thin => "Thin", - Self::ExtraLight => "ExtraLight", - Self::Light => "Light", - Self::Regular => "Regular", - Self::Medium => "Medium", - Self::SemiBold => "SemiBold", - Self::Bold => "Bold", - Self::ExtraBold => "ExtraBold", - Self::Heavy => "Heavy", - } - } - - pub fn from_name(name: impl AsRef) -> Option { - match name.as_ref() { - "Thin" => Some(Self::Thin), - "ExtraLight" => Some(Self::ExtraLight), - "Light" => Some(Self::Light), - "Regular" => Some(Self::Regular), - "Medium" => Some(Self::Medium), - "SemiBold" => Some(Self::SemiBold), - "Bold" => Some(Self::Bold), - "ExtraBold" => Some(Self::ExtraBold), - "Heavy" => Some(Self::Heavy), - _ => None, - } - } - - pub fn into_num(self) -> u16 { + pub fn as_u16(&self) -> u16 { match self { Self::Thin => 100, Self::ExtraLight => 200, @@ -199,8 +168,8 @@ impl FontWeight { } } - pub fn from_num(num: u16) -> Option { - match num { + pub fn from_u16(n: u16) -> Option { + match n { 100 => Some(Self::Thin), 200 => Some(Self::ExtraLight), 300 => Some(Self::Light), @@ -215,43 +184,60 @@ impl FontWeight { } } -impl fmt::Display for FontWeight { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.clone().into_name()) +impl std::str::FromStr for FontWeight { + type Err = &'static str; + fn from_str(s: &str) -> Result { + match s { + "Thin" => Ok(Self::Thin), + "ExtraLight" => Ok(Self::ExtraLight), + "Light" => Ok(Self::Light), + "Regular" => Ok(Self::Regular), + "Medium" => Ok(Self::Medium), + "SemiBold" => Ok(Self::SemiBold), + "Bold" => Ok(Self::Bold), + "ExtraBold" => Ok(Self::ExtraBold), + "Heavy" => Ok(Self::Heavy), + _ => Err("Unknown FontWeight"), + } } } -#[derive(Debug, Clone, PartialEq)] +impl std::fmt::Display for FontWeight { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Thin => "Thin", + Self::ExtraLight => "ExtraLight", + Self::Light => "Light", + Self::Regular => "Regular", + Self::Medium => "Medium", + Self::SemiBold => "SemiBold", + Self::Bold => "Bold", + Self::ExtraBold => "ExtraBold", + Self::Heavy => "Heavy", + } + ) + } +} + +#[derive(Debug, Clone, Copy, PartialEq)] pub(crate) enum FontStyle { Normal, Italic, } impl FontStyle { - pub fn into_name(self) -> &'static str { - match self { - Self::Normal => "Normal", - Self::Italic => "Italic", - } - } - - pub fn from_name(name: impl AsRef) -> Option { - match name.as_ref() { - "Normal" => Some(Self::Normal), - "Italic" => Some(Self::Italic), - _ => None, - } - } - - pub fn into_num(self) -> u8 { + pub fn as_u8(&self) -> u8 { match self { Self::Normal => 0, Self::Italic => 1, } } - pub fn from_num(num: u8) -> Option { - match num { + pub fn from_u8(n: u8) -> Option { + match n { 0 => Some(Self::Normal), 1 => Some(Self::Italic), _ => None, @@ -259,59 +245,77 @@ impl FontStyle { } } -impl fmt::Display for FontStyle { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.clone().into_name()) +impl std::str::FromStr for FontStyle { + type Err = &'static str; + fn from_str(s: &str) -> Result { + match s { + "Normal" => Ok(Self::Normal), + "Italic" => Ok(Self::Italic), + _ => Err("Unknown FontStyle"), + } + } +} + +impl std::fmt::Display for FontStyle { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Normal => "Normal", + Self::Italic => "Italic", + } + ) } } #[rustfmt::skip] const FONT_ENUM_MAP: &[(&str, Option)] = &[ - ("Legacy", Some(("rbxasset://fonts/families/LegacyArial.json", FontWeight::Regular, FontStyle::Normal))), - ("Arial", Some(("rbxasset://fonts/families/Arial.json", FontWeight::Regular, FontStyle::Normal))), - ("ArialBold", Some(("rbxasset://fonts/families/Arial.json", FontWeight::Bold, FontStyle::Normal))), - ("SourceSans", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Regular, FontStyle::Normal))), - ("SourceSansBold", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Bold, FontStyle::Normal))), - ("SourceSansSemibold", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::SemiBold, FontStyle::Normal))), - ("SourceSansLight", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Light, FontStyle::Normal))), - ("SourceSansItalic", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Regular, FontStyle::Italic))), - ("Bodoni", Some(("rbxasset://fonts/families/AccanthisADFStd.json", FontWeight::Regular, FontStyle::Normal))), - ("Garamond", Some(("rbxasset://fonts/families/Guru.json", FontWeight::Regular, FontStyle::Normal))), - ("Cartoon", Some(("rbxasset://fonts/families/ComicNeueAngular.json", FontWeight::Regular, FontStyle::Normal))), - ("Code", Some(("rbxasset://fonts/families/Inconsolata.json", FontWeight::Regular, FontStyle::Normal))), - ("Highway", Some(("rbxasset://fonts/families/HighwayGothic.json", FontWeight::Regular, FontStyle::Normal))), - ("SciFi", Some(("rbxasset://fonts/families/Zekton.json", FontWeight::Regular, FontStyle::Normal))), - ("Arcade", Some(("rbxasset://fonts/families/PressStart2P.json", FontWeight::Regular, FontStyle::Normal))), - ("Fantasy", Some(("rbxasset://fonts/families/Balthazar.json", FontWeight::Regular, FontStyle::Normal))), - ("Antique", Some(("rbxasset://fonts/families/RomanAntique.json", FontWeight::Regular, FontStyle::Normal))), - ("Gotham", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Regular, FontStyle::Normal))), - ("GothamMedium", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Medium, FontStyle::Normal))), - ("GothamBold", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Bold, FontStyle::Normal))), - ("GothamBlack", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Heavy, FontStyle::Normal))), - ("AmaticSC", Some(("rbxasset://fonts/families/AmaticSC.json", FontWeight::Regular, FontStyle::Normal))), - ("Bangers", Some(("rbxasset://fonts/families/Bangers.json", FontWeight::Regular, FontStyle::Normal))), - ("Creepster", Some(("rbxasset://fonts/families/Creepster.json", FontWeight::Regular, FontStyle::Normal))), - ("DenkOne", Some(("rbxasset://fonts/families/DenkOne.json", FontWeight::Regular, FontStyle::Normal))), - ("Fondamento", Some(("rbxasset://fonts/families/Fondamento.json", FontWeight::Regular, FontStyle::Normal))), - ("FredokaOne", Some(("rbxasset://fonts/families/FredokaOne.json", FontWeight::Regular, FontStyle::Normal))), - ("GrenzeGotisch", Some(("rbxasset://fonts/families/GrenzeGotisch.json", FontWeight::Regular, FontStyle::Normal))), - ("IndieFlower", Some(("rbxasset://fonts/families/IndieFlower.json", FontWeight::Regular, FontStyle::Normal))), - ("JosefinSans", Some(("rbxasset://fonts/families/JosefinSans.json", FontWeight::Regular, FontStyle::Normal))), - ("Jura", Some(("rbxasset://fonts/families/Jura.json", FontWeight::Regular, FontStyle::Normal))), - ("Kalam", Some(("rbxasset://fonts/families/Kalam.json", FontWeight::Regular, FontStyle::Normal))), - ("LuckiestGuy", Some(("rbxasset://fonts/families/LuckiestGuy.json", FontWeight::Regular, FontStyle::Normal))), - ("Merriweather", Some(("rbxasset://fonts/families/Merriweather.json", FontWeight::Regular, FontStyle::Normal))), - ("Michroma", Some(("rbxasset://fonts/families/Michroma.json", FontWeight::Regular, FontStyle::Normal))), - ("Nunito", Some(("rbxasset://fonts/families/Nunito.json", FontWeight::Regular, FontStyle::Normal))), - ("Oswald", Some(("rbxasset://fonts/families/Oswald.json", FontWeight::Regular, FontStyle::Normal))), - ("PatrickHand", Some(("rbxasset://fonts/families/PatrickHand.json", FontWeight::Regular, FontStyle::Normal))), - ("PermanentMarker", Some(("rbxasset://fonts/families/PermanentMarker.json", FontWeight::Regular, FontStyle::Normal))), - ("Roboto", Some(("rbxasset://fonts/families/Roboto.json", FontWeight::Regular, FontStyle::Normal))), - ("RobotoCondensed", Some(("rbxasset://fonts/families/RobotoCondensed.json", FontWeight::Regular, FontStyle::Normal))), - ("RobotoMono", Some(("rbxasset://fonts/families/RobotoMono.json", FontWeight::Regular, FontStyle::Normal))), - ("Sarpanch", Some(("rbxasset://fonts/families/Sarpanch.json", FontWeight::Regular, FontStyle::Normal))), - ("SpecialElite", Some(("rbxasset://fonts/families/SpecialElite.json", FontWeight::Regular, FontStyle::Normal))), - ("TitilliumWeb", Some(("rbxasset://fonts/families/TitilliumWeb.json", FontWeight::Regular, FontStyle::Normal))), - ("Ubuntu", Some(("rbxasset://fonts/families/Ubuntu.json", FontWeight::Regular, FontStyle::Normal))), - ("Unknown", None), + ("Legacy", Some(("rbxasset://fonts/families/LegacyArial.json", FontWeight::Regular, FontStyle::Normal))), + ("Arial", Some(("rbxasset://fonts/families/Arial.json", FontWeight::Regular, FontStyle::Normal))), + ("ArialBold", Some(("rbxasset://fonts/families/Arial.json", FontWeight::Bold, FontStyle::Normal))), + ("SourceSans", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Regular, FontStyle::Normal))), + ("SourceSansBold", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Bold, FontStyle::Normal))), + ("SourceSansSemibold", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::SemiBold, FontStyle::Normal))), + ("SourceSansLight", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Light, FontStyle::Normal))), + ("SourceSansItalic", Some(("rbxasset://fonts/families/SourceSansPro.json", FontWeight::Regular, FontStyle::Italic))), + ("Bodoni", Some(("rbxasset://fonts/families/AccanthisADFStd.json", FontWeight::Regular, FontStyle::Normal))), + ("Garamond", Some(("rbxasset://fonts/families/Guru.json", FontWeight::Regular, FontStyle::Normal))), + ("Cartoon", Some(("rbxasset://fonts/families/ComicNeueAngular.json", FontWeight::Regular, FontStyle::Normal))), + ("Code", Some(("rbxasset://fonts/families/Inconsolata.json", FontWeight::Regular, FontStyle::Normal))), + ("Highway", Some(("rbxasset://fonts/families/HighwayGothic.json", FontWeight::Regular, FontStyle::Normal))), + ("SciFi", Some(("rbxasset://fonts/families/Zekton.json", FontWeight::Regular, FontStyle::Normal))), + ("Arcade", Some(("rbxasset://fonts/families/PressStart2P.json", FontWeight::Regular, FontStyle::Normal))), + ("Fantasy", Some(("rbxasset://fonts/families/Balthazar.json", FontWeight::Regular, FontStyle::Normal))), + ("Antique", Some(("rbxasset://fonts/families/RomanAntique.json", FontWeight::Regular, FontStyle::Normal))), + ("Gotham", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Regular, FontStyle::Normal))), + ("GothamMedium", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Medium, FontStyle::Normal))), + ("GothamBold", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Bold, FontStyle::Normal))), + ("GothamBlack", Some(("rbxasset://fonts/families/GothamSSm.json", FontWeight::Heavy, FontStyle::Normal))), + ("AmaticSC", Some(("rbxasset://fonts/families/AmaticSC.json", FontWeight::Regular, FontStyle::Normal))), + ("Bangers", Some(("rbxasset://fonts/families/Bangers.json", FontWeight::Regular, FontStyle::Normal))), + ("Creepster", Some(("rbxasset://fonts/families/Creepster.json", FontWeight::Regular, FontStyle::Normal))), + ("DenkOne", Some(("rbxasset://fonts/families/DenkOne.json", FontWeight::Regular, FontStyle::Normal))), + ("Fondamento", Some(("rbxasset://fonts/families/Fondamento.json", FontWeight::Regular, FontStyle::Normal))), + ("FredokaOne", Some(("rbxasset://fonts/families/FredokaOne.json", FontWeight::Regular, FontStyle::Normal))), + ("GrenzeGotisch", Some(("rbxasset://fonts/families/GrenzeGotisch.json", FontWeight::Regular, FontStyle::Normal))), + ("IndieFlower", Some(("rbxasset://fonts/families/IndieFlower.json", FontWeight::Regular, FontStyle::Normal))), + ("JosefinSans", Some(("rbxasset://fonts/families/JosefinSans.json", FontWeight::Regular, FontStyle::Normal))), + ("Jura", Some(("rbxasset://fonts/families/Jura.json", FontWeight::Regular, FontStyle::Normal))), + ("Kalam", Some(("rbxasset://fonts/families/Kalam.json", FontWeight::Regular, FontStyle::Normal))), + ("LuckiestGuy", Some(("rbxasset://fonts/families/LuckiestGuy.json", FontWeight::Regular, FontStyle::Normal))), + ("Merriweather", Some(("rbxasset://fonts/families/Merriweather.json", FontWeight::Regular, FontStyle::Normal))), + ("Michroma", Some(("rbxasset://fonts/families/Michroma.json", FontWeight::Regular, FontStyle::Normal))), + ("Nunito", Some(("rbxasset://fonts/families/Nunito.json", FontWeight::Regular, FontStyle::Normal))), + ("Oswald", Some(("rbxasset://fonts/families/Oswald.json", FontWeight::Regular, FontStyle::Normal))), + ("PatrickHand", Some(("rbxasset://fonts/families/PatrickHand.json", FontWeight::Regular, FontStyle::Normal))), + ("PermanentMarker", Some(("rbxasset://fonts/families/PermanentMarker.json", FontWeight::Regular, FontStyle::Normal))), + ("Roboto", Some(("rbxasset://fonts/families/Roboto.json", FontWeight::Regular, FontStyle::Normal))), + ("RobotoCondensed", Some(("rbxasset://fonts/families/RobotoCondensed.json", FontWeight::Regular, FontStyle::Normal))), + ("RobotoMono", Some(("rbxasset://fonts/families/RobotoMono.json", FontWeight::Regular, FontStyle::Normal))), + ("Sarpanch", Some(("rbxasset://fonts/families/Sarpanch.json", FontWeight::Regular, FontStyle::Normal))), + ("SpecialElite", Some(("rbxasset://fonts/families/SpecialElite.json", FontWeight::Regular, FontStyle::Normal))), + ("TitilliumWeb", Some(("rbxasset://fonts/families/TitilliumWeb.json", FontWeight::Regular, FontStyle::Normal))), + ("Ubuntu", Some(("rbxasset://fonts/families/Ubuntu.json", FontWeight::Regular, FontStyle::Normal))), + ("Unknown", None), ];