From 261946cf4d241bb549e3e5478cc2919ceff2eb7c Mon Sep 17 00:00:00 2001 From: Sead Feng Date: Thu, 22 Aug 2024 15:44:03 +0800 Subject: [PATCH] update --- bin/transforms.js | 59 +- src/components/frontend/page/style/fonts.tsx | 56 +- src/components/frontend/page/style/main.tsx | 2 +- src/fonts.ts | 53 - src/slugs.ts | 3 +- src/transforms.ts | 1181 ++++++++++++++++++ 6 files changed, 1281 insertions(+), 73 deletions(-) delete mode 100644 src/fonts.ts diff --git a/bin/transforms.js b/bin/transforms.js index 45860b9..70b80df 100644 --- a/bin/transforms.js +++ b/bin/transforms.js @@ -12,14 +12,69 @@ fs.readdirSync(sourceDir).forEach(file => { const content = fs.readFileSync(filePath, 'utf8'); const json = JSON.parse(content); - const key = Object.keys(json)[0]; - transforms[key] = json[key]; + transforms = { + ...transforms, + ...json + } } }); +const fontKeys = [ + "circled", + "circledNegative", + "doubleStruck", + "fraktur", + "frakturBold", + "inverted", + "mathematicalBold", + "mathematicalItalic", + "mathematicalBoldItalic", + "mirrored", + "monospace", + "parenthesized", + "sans", + "sansBold", + "sansItalic", + "sansBoldItalic", + "sansSerif", + "sansSerifBold", + "sansSerifItalic", + "sansSerifBoldItalic", + "script", + "boldScript", + "serif", + "serifBold", + "serifItalic", + "serifBoldItalic", + "smallCaps", + "squared", + "squaredNegative", + "subscript", + "superscript" +]; + +function toReadableFontName(key) { + return key + .split(/(?=[A-Z])/) + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' ') + .replace(/Negative$/, ' Negative'); +} + +const fonts = Object.fromEntries( + fontKeys.map(key => [key, toReadableFontName(key)]) +); + const tsCode = ` // This file is auto-generated. Do not edit manually. + export const transforms = ${JSON.stringify(transforms, null, 2)}; + +export const fontKeys = ${JSON.stringify(fontKeys, null, 2)} as const; + +export type FontKey = typeof fontKeys[number]; + +export const fonts: Record = ${JSON.stringify(fonts, null, 2)}; `; fs.writeFileSync(outputFile, tsCode); diff --git a/src/components/frontend/page/style/fonts.tsx b/src/components/frontend/page/style/fonts.tsx index 17bdaa7..a29b632 100644 --- a/src/components/frontend/page/style/fonts.tsx +++ b/src/components/frontend/page/style/fonts.tsx @@ -1,30 +1,54 @@ "use client"; import Copy from "@/components/shared/copy"; -import { FontKey, fonts } from "@/fonts"; +import { FontKey, fonts, transforms } from "@/transforms"; import { HTMLAttributes } from "react"; + +type TransformMap = { [key: string]: string }; -export const Fonts =({ +export const Fonts = ({ className, content, currentFonts -}:{ +}: { className?: HTMLAttributes["className"]; currentFonts: Readonly; content: string; -})=> { +}) => { + const FontItem = ({ fontKey }: { fontKey: FontKey }) => { + const chars = transforms[fontKey] as TransformMap; + + // const adjustUnicode = (char: string) => { + // const code = char.charCodeAt(0); + // if (code >= 0x2000 && code <= 0x2FFF) { + // return char + '\u034F\u0308'; + // } + // return char; + // }; + + const transformAndAdjust = (text: string) => { + return text.split('').map(char => { + return chars[char] || char; + // const transformedChar = chars[char] || char; + // return adjustUnicode(transformedChar); + }).join(''); + }; + + const transformedContent = transformAndAdjust(content); + + return ( +
+
+
{transformedContent}
+ {transformedContent} +
+
{fonts[fontKey]}
+
+ ); + }; + return (
- {currentFonts.map(key =>{ - return( -
-
-
{content}
- {content} -
-
{fonts[key]}
-
- ) - })} + {currentFonts.map(key => )}
); -} +}; \ No newline at end of file diff --git a/src/components/frontend/page/style/main.tsx b/src/components/frontend/page/style/main.tsx index 6c9aa46..8875573 100644 --- a/src/components/frontend/page/style/main.tsx +++ b/src/components/frontend/page/style/main.tsx @@ -2,9 +2,9 @@ import { Markdown } from "@/components/shared/markdown"; import { Textarea } from "@/components/ui/textarea"; -import { fontKeys } from "@/fonts"; import { cn } from "@/lib/utils"; import { slugFonts, SlugKey } from "@/slugs"; +import { fontKeys } from "@/transforms"; import { useState } from "react"; import { Fonts } from "./fonts"; import { Sidebar } from "./sidebar"; diff --git a/src/fonts.ts b/src/fonts.ts deleted file mode 100644 index 54fdf5a..0000000 --- a/src/fonts.ts +++ /dev/null @@ -1,53 +0,0 @@ - -export const fontKeys = [ - "script", - "superscript", - "smallCaps", - "monospace", - "mathematicalItalic", - "mathematicalBoldItalic", - "mathematicalBold", - "boldScript", - "serif", - "serifBold", - "serifItalic", - "serifBoldItalic", - "circled", - "circledNegative", - "doubleStruck", - "squared", - "squaredNegative", - "parenthesized", - "sans", - "sansBold", - "sansItalic", - "sansBoldItalic" -] as const; - -export type FontKey = typeof fontKeys[number]; - -// Font Name for fontKeys -export const fonts: Record = { - script: "Script", - superscript: "Super Script", - smallCaps: "Small Caps", - monospace: "Monospace", - mathematicalItalic: "Mathematical Italic", - mathematicalBoldItalic: "Mathematical Bold Italic", - mathematicalBold: "Mathematical Bold", - boldScript: "Bold Script", - serif: "Serif", - serifBold: "Serif Bold", - serifItalic: "Serif Italic", - serifBoldItalic: "Serif Bold Italic", - doubleStruck: "Double Struck", - circled: "Circled", - circledNegative: "Circled Negative", - squared: "Squared", - squaredNegative: "Squared Negative", - parenthesized: "Parenthesized", - sans: "Sans", - sansBold: "Sans Bold", - sansItalic: "Sans Italic", - sansBoldItalic: "Sans Bold Italic", -} \ No newline at end of file diff --git a/src/slugs.ts b/src/slugs.ts index 6fb87b7..63dcd59 100644 --- a/src/slugs.ts +++ b/src/slugs.ts @@ -1,4 +1,5 @@ -import { FontKey } from "./fonts"; +import { FontKey } from "./transforms"; + export const slugKeys = [ "all", diff --git a/src/transforms.ts b/src/transforms.ts index b626a2c..989071a 100644 --- a/src/transforms.ts +++ b/src/transforms.ts @@ -1,5 +1,6 @@ // This file is auto-generated. Do not edit manually. + export const transforms = { "circled": { "0": "⓪", @@ -300,6 +301,101 @@ export const transforms = { "<": "<", ">": ">" }, + "frakturBold": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝖆", + "b": "𝖇", + "c": "𝖈", + "d": "𝖉", + "e": "𝖊", + "f": "𝖋", + "g": "𝖌", + "h": "𝖍", + "i": "𝖎", + "j": "𝖏", + "k": "𝖐", + "l": "𝖑", + "m": "𝖒", + "n": "𝖓", + "o": "𝖔", + "p": "𝖕", + "q": "𝖖", + "r": "𝖗", + "s": "𝖘", + "t": "𝖙", + "u": "𝖚", + "v": "𝖛", + "w": "𝖜", + "x": "𝖝", + "y": "𝖞", + "z": "𝖟", + "A": "𝕬", + "B": "𝕭", + "C": "𝕮", + "D": "𝕯", + "E": "𝕰", + "F": "𝕱", + "G": "𝕲", + "H": "𝕳", + "I": "𝕴", + "J": "𝕵", + "K": "𝕶", + "L": "𝕷", + "M": "𝕸", + "N": "𝕹", + "O": "𝕺", + "P": "𝕻", + "Q": "𝕼", + "R": "𝕽", + "S": "𝕾", + "T": "𝕿", + "U": "𝖀", + "V": "𝖁", + "W": "𝖂", + "X": "𝖃", + "Y": "𝖄", + "Z": "𝖅", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "+": "+", + "=": "=", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "/": "/", + "\\": "\\", + "@": "@", + "#": "⁎", + "$": "₽", + "%": "%", + "^": "^", + "&": "⁊", + "*": "*", + "_": "_", + "'": "'", + "\"": "\"", + ":": ":", + ";": ";", + "~": "~", + "|": "|", + "<": "<", + ">": ">" + }, "inverted": { "0": "0", "1": "Ɩ", @@ -489,6 +585,192 @@ export const transforms = { "<": "<", ">": ">" }, + "mathematicalItalic": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝐴", + "b": "𝐵", + "c": "𝐶", + "d": "𝐷", + "e": "𝐸", + "f": "𝐹", + "g": "𝐺", + "h": "𝐻", + "i": "𝐼", + "j": "𝐽", + "k": "𝐾", + "l": "𝐿", + "m": "𝑀", + "n": "𝑁", + "o": "𝑂", + "p": "𝑃", + "q": "𝑄", + "r": "𝑅", + "s": "𝑆", + "t": "𝑇", + "u": "𝑈", + "v": "𝑉", + "w": "𝑊", + "x": "𝑋", + "y": "𝑌", + "z": "𝑍", + "A": "𝐴", + "B": "𝐵", + "C": "𝐶", + "D": "𝐷", + "E": "𝐸", + "F": "𝐹", + "G": "𝐺", + "H": "𝐻", + "I": "𝐼", + "J": "𝐽", + "K": "𝐾", + "L": "𝐿", + "M": "𝑀", + "N": "𝑁", + "O": "𝑂", + "P": "𝑃", + "Q": "𝑄", + "R": "𝑅", + "S": "𝑆", + "T": "𝑇", + "U": "𝑈", + "V": "𝑉", + "W": "𝑊", + "X": "𝑋", + "Y": "𝑌", + "Z": "𝑍", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, + "mathematicalBoldItalic": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝑨", + "b": "𝑩", + "c": "𝑪", + "d": "𝑫", + "e": "𝑬", + "f": "𝑭", + "g": "𝑮", + "h": "𝑯", + "i": "𝑰", + "j": "𝑱", + "k": "𝑲", + "l": "𝑳", + "m": "𝑴", + "n": "𝑵", + "o": "𝑶", + "p": "𝑷", + "q": "𝑸", + "r": "𝑹", + "s": "𝑺", + "t": "𝑻", + "u": "𝑼", + "v": "𝑽", + "w": "𝑾", + "x": "𝑿", + "y": "𝒀", + "z": "𝒁", + "A": "𝑨", + "B": "𝑩", + "C": "𝑪", + "D": "𝑫", + "E": "𝑬", + "F": "𝑭", + "G": "𝑮", + "H": "𝑯", + "I": "𝑰", + "J": "𝑱", + "K": "𝑲", + "L": "𝑳", + "M": "𝑴", + "N": "𝑵", + "O": "𝑶", + "P": "𝑷", + "Q": "𝑸", + "R": "𝑹", + "S": "𝑺", + "T": "𝑻", + "U": "𝑼", + "V": "𝑽", + "W": "𝑾", + "X": "𝑿", + "Y": "𝒀", + "Z": "𝒁", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, "mirrored": { "0": "0", "1": "߁", @@ -816,6 +1098,178 @@ export const transforms = { "y": "𝗒", "z": "𝗓" }, + "sansBold": { + "0": "𝟬", + "1": "𝟭", + "2": "𝟮", + "3": "𝟯", + "4": "𝟰", + "5": "𝟱", + "6": "𝟲", + "7": "𝟯", + "8": "𝟴", + "9": "𝟵", + "A": "𝗔", + "B": "𝗕", + "C": "𝗖", + "D": "𝗗", + "E": "𝗘", + "F": "𝗙", + "G": "𝗚", + "H": "𝗛", + "I": "𝗜", + "J": "𝗝", + "K": "𝗞", + "L": "𝗟", + "M": "𝗠", + "N": "𝗡", + "O": "𝗢", + "P": "𝗣", + "Q": "𝗤", + "R": "𝗥", + "S": "𝗦", + "T": "𝗧", + "U": "𝗨", + "V": "𝗩", + "W": "𝗪", + "X": "𝗫", + "Y": "𝗬", + "Z": "𝗭", + "a": "𝗮", + "b": "𝗯", + "c": "𝗰", + "d": "𝗱", + "e": "𝗲", + "f": "𝗳", + "g": "𝗴", + "h": "𝗵", + "i": "𝗶", + "j": "𝗷", + "k": "𝗸", + "l": "𝗹", + "m": "𝗺", + "n": "𝗻", + "o": "𝗼", + "p": "𝗽", + "q": "𝗾", + "r": "𝗿", + "s": "𝘀", + "t": "𝘁", + "u": "𝘂", + "v": "𝘃", + "w": "𝘄", + "x": "𝘅", + "y": "𝘆", + "z": "𝘇" + }, + "sansItalic": { + "A": "𝘈", + "B": "𝘉", + "C": "𝘊", + "D": "𝘋", + "E": "𝘌", + "F": "𝘍", + "G": "𝘎", + "H": "𝘏", + "I": "𝘐", + "J": "𝘑", + "K": "𝘒", + "L": "𝘓", + "M": "𝘔", + "N": "𝘕", + "O": "𝘖", + "P": "𝘗", + "Q": "𝘘", + "R": "𝘙", + "S": "𝘚", + "T": "𝘛", + "U": "𝘜", + "V": "𝘝", + "W": "𝘞", + "X": "𝘟", + "Y": "𝘠", + "Z": "𝘡", + "a": "𝘢", + "b": "𝘣", + "c": "𝘤", + "d": "𝘥", + "e": "𝘦", + "f": "𝘧", + "g": "𝘨", + "h": "𝘩", + "i": "𝘪", + "j": "𝘫", + "k": "𝘬", + "l": "𝘭", + "m": "𝘮", + "n": "𝘯", + "o": "𝘰", + "p": "𝘱", + "q": "𝘲", + "r": "𝘳", + "s": "𝘴", + "t": "𝘵", + "u": "𝘶", + "v": "𝘷", + "w": "𝘸", + "x": "𝘹", + "y": "𝘺", + "z": "𝘻" + }, + "sansBoldItalic": { + "A": "𝘼", + "B": "𝘽", + "C": "𝘾", + "D": "𝘿", + "E": "𝙀", + "F": "𝙁", + "G": "𝙂", + "H": "𝙃", + "I": "𝙄", + "J": "𝙅", + "K": "𝙆", + "L": "𝙇", + "M": "𝙈", + "N": "𝙉", + "O": "𝙊", + "P": "𝙋", + "Q": "𝙌", + "R": "𝙍", + "S": "𝙎", + "T": "𝙏", + "U": "𝙐", + "V": "𝙑", + "W": "𝙒", + "X": "𝙓", + "Y": "𝙔", + "Z": "𝙕", + "a": "𝙖", + "b": "𝙗", + "c": "𝙘", + "d": "𝙙", + "e": "𝙚", + "f": "𝙛", + "g": "𝙜", + "h": "𝙝", + "i": "𝙞", + "j": "𝙟", + "k": "𝙠", + "l": "𝙡", + "m": "𝙢", + "n": "𝙣", + "o": "𝙤", + "p": "𝙥", + "q": "𝙦", + "r": "𝙧", + "s": "𝙨", + "t": "𝙩", + "u": "𝙪", + "v": "𝙫", + "w": "𝙬", + "x": "𝙭", + "y": "𝙮", + "z": "𝙯" + }, "sansSerif": { "0": "𝟢", "1": "𝟣", @@ -909,6 +1363,285 @@ export const transforms = { "<": "<", ">": ">" }, + "sansSerifBold": { + "0": "𝟬", + "1": "𝟭", + "2": "𝟮", + "3": "𝟯", + "4": "𝟰", + "5": "𝟱", + "6": "𝟲", + "7": "𝟳", + "8": "𝟴", + "9": "𝟵", + "a": "𝗔", + "b": "𝗕", + "c": "𝗖", + "d": "𝗗", + "e": "𝗘", + "f": "𝗙", + "g": "𝗚", + "h": "𝗛", + "i": "𝗜", + "j": "𝗝", + "k": "𝗞", + "l": "𝗟", + "m": "𝗠", + "n": "𝗡", + "o": "𝗢", + "p": "𝗣", + "q": "𝗤", + "r": "𝗥", + "s": "𝗦", + "t": "𝗧", + "u": "𝗨", + "v": "𝗩", + "w": "𝗪", + "x": "𝗫", + "y": "𝗬", + "z": "𝗭", + "A": "𝗔", + "B": "𝗕", + "C": "𝗖", + "D": "𝗗", + "E": "𝗘", + "F": "𝗙", + "G": "𝗚", + "H": "𝗛", + "I": "𝗜", + "J": "𝗝", + "K": "𝗞", + "L": "𝗟", + "M": "𝗠", + "N": "𝗡", + "O": "𝗢", + "P": "𝗣", + "Q": "𝗤", + "R": "𝗥", + "S": "𝗦", + "T": "𝗧", + "U": "𝗨", + "V": "𝗩", + "W": "𝗪", + "X": "𝗫", + "Y": "𝗬", + "Z": "𝗭", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, + "sansSerifItalic": { + "0": "𝟢", + "1": "𝟣", + "2": "𝟤", + "3": "𝟥", + "4": "𝟦", + "5": "𝟧", + "6": "𝟨", + "7": "𝟩", + "8": "𝟪", + "9": "𝟫", + "a": "𝘈", + "b": "𝘉", + "c": "𝘊", + "d": "𝘋", + "e": "𝘌", + "f": "𝘍", + "g": "𝘎", + "h": "𝘏", + "i": "𝘐", + "j": "𝘑", + "k": "𝘒", + "l": "𝘓", + "m": "𝘔", + "n": "𝘕", + "o": "𝘖", + "p": "𝘗", + "q": "𝘘", + "r": "𝘙", + "s": "𝘚", + "t": "𝘛", + "u": "𝘜", + "v": "𝘝", + "w": "𝘞", + "x": "𝘟", + "y": "𝘠", + "z": "𝘡", + "A": "𝘈", + "B": "𝘉", + "C": "𝘊", + "D": "𝘋", + "E": "𝘌", + "F": "𝘍", + "G": "𝘎", + "H": "𝘏", + "I": "𝘐", + "J": "𝘑", + "K": "𝘒", + "L": "𝘓", + "M": "𝘔", + "N": "𝘕", + "O": "𝘖", + "P": "𝘗", + "Q": "𝘘", + "R": "𝘙", + "S": "𝘚", + "T": "𝘛", + "U": "𝘜", + "V": "𝘝", + "W": "𝘞", + "X": "𝘟", + "Y": "𝘠", + "Z": "𝘡", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, + "sansSerifBoldItalic": { + "0": "𝟢", + "1": "𝟣", + "2": "𝟤", + "3": "𝟥", + "4": "𝟦", + "5": "𝟧", + "6": "𝟨", + "7": "𝟩", + "8": "𝟪", + "9": "𝟫", + "a": "𝘼", + "b": "𝘽", + "c": "𝘾", + "d": "𝘿", + "e": "𝙀", + "f": "𝙁", + "g": "𝙂", + "h": "𝙃", + "i": "𝙄", + "j": "𝙅", + "k": "𝙆", + "l": "𝙇", + "m": "𝙈", + "n": "𝙉", + "o": "𝙊", + "p": "𝙋", + "q": "𝙌", + "r": "𝙍", + "s": "𝙎", + "t": "𝙏", + "u": "𝙐", + "v": "𝙑", + "w": "𝙒", + "x": "𝙓", + "y": "𝙔", + "z": "𝙕", + "A": "𝘼", + "B": "𝘽", + "C": "𝘾", + "D": "𝘿", + "E": "𝙀", + "F": "𝙁", + "G": "𝙂", + "H": "𝙃", + "I": "𝙄", + "J": "𝙅", + "K": "𝙆", + "L": "𝙇", + "M": "𝙈", + "N": "𝙉", + "O": "𝙊", + "P": "𝙋", + "Q": "𝙌", + "R": "𝙍", + "S": "𝙎", + "T": "𝙏", + "U": "𝙐", + "V": "𝙑", + "W": "𝙒", + "X": "𝙓", + "Y": "𝙔", + "Z": "𝙕", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, "script": { "0": "𝟎", "1": "𝟏", @@ -1002,6 +1735,99 @@ export const transforms = { "<": "<", ">": ">" }, + "boldScript": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝓐", + "b": "𝓑", + "c": "𝓒", + "d": "𝓓", + "e": "𝓔", + "f": "𝓕", + "g": "𝓖", + "h": "𝓗", + "i": "𝓘", + "j": "𝓙", + "k": "𝓚", + "l": "𝓛", + "m": "𝓜", + "n": "𝓝", + "o": "𝓞", + "p": "𝓟", + "q": "𝓠", + "r": "𝓡", + "s": "𝓢", + "t": "𝓣", + "u": "𝓤", + "v": "𝓥", + "w": "𝓦", + "x": "𝓧", + "y": "𝓨", + "z": "𝓩", + "A": "𝓐", + "B": "𝓑", + "C": "𝓒", + "D": "𝓓", + "E": "𝓔", + "F": "𝓕", + "G": "𝓖", + "H": "𝓗", + "I": "𝓘", + "J": "𝓙", + "K": "𝓚", + "L": "𝓛", + "M": "𝓜", + "N": "𝓝", + "O": "𝓞", + "P": "𝓟", + "Q": "𝓠", + "R": "𝓡", + "S": "𝓢", + "T": "𝓣", + "U": "𝓤", + "V": "𝓥", + "W": "𝓦", + "X": "𝓧", + "Y": "𝓨", + "Z": "𝓩", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "_": "_", + ":": ":", + ";": ";", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "'": "'", + "\"": "\"", + "/": "/", + "\\": "\\", + "&": "&", + "@": "@", + "#": "#", + "$": "$", + "%": "%", + "^": "^", + "*": "*", + "+": "+", + "=": "=", + "<": "<", + ">": ">" + }, "serif": { "0": "𝟎", "1": "𝟏", @@ -1097,6 +1923,291 @@ export const transforms = { "<": "<", ">": ">" }, + "serifBold": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝐚", + "b": "𝐛", + "c": "𝐜", + "d": "𝐝", + "e": "𝐞", + "f": "𝐟", + "g": "𝐠", + "h": "𝐡", + "i": "𝐢", + "j": "𝐣", + "k": "𝐤", + "l": "𝐥", + "m": "𝐦", + "n": "𝐧", + "o": "𝐨", + "p": "𝐩", + "q": "𝐪", + "r": "𝐫", + "s": "𝐬", + "t": "𝐭", + "u": "𝐮", + "v": "𝐯", + "w": "𝐰", + "x": "𝐱", + "y": "𝐲", + "z": "𝐳", + "A": "𝐀", + "B": "𝐁", + "C": "𝐂", + "D": "𝐃", + "E": "𝐄", + "F": "𝐅", + "G": "𝐆", + "H": "𝐇", + "I": "𝐈", + "J": "𝐉", + "K": "𝐊", + "L": "𝐋", + "M": "𝐌", + "N": "𝐍", + "O": "𝐎", + "P": "𝐏", + "Q": "𝐐", + "R": "𝐑", + "S": "𝐒", + "T": "𝐓", + "U": "𝐔", + "V": "𝐕", + "W": "𝐖", + "X": "𝐗", + "Y": "𝐘", + "Z": "𝐙", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "+": "+", + "=": "=", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "/": "/", + "\\": "\\", + "@": "@", + "#": "⁎", + "$": "₽", + "%": "%", + "^": "^", + "&": "⁊", + "*": "*", + "_": "_", + "'": "'", + "\"": "\"", + ":": ":", + ";": ";", + "~": "~", + "|": "|", + "<": "<", + ">": ">" + }, + "serifItalic": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝑎", + "b": "𝑏", + "c": "𝑐", + "d": "𝑑", + "e": "𝑒", + "f": "𝑓", + "g": "𝑔", + "h": "ℎ", + "i": "𝑖", + "j": "𝑗", + "k": "𝑘", + "l": "𝑙", + "m": "𝑚", + "n": "𝑛", + "o": "𝑜", + "p": "𝑝", + "q": "𝑞", + "r": "𝑟", + "s": "𝑠", + "t": "𝑡", + "u": "𝑢", + "v": "𝑣", + "w": "𝑤", + "x": "𝑥", + "y": "𝑦", + "z": "𝑧", + "A": "𝐴", + "B": "𝐵", + "C": "𝐶", + "D": "𝐷", + "E": "𝐸", + "F": "𝐹", + "G": "𝐺", + "H": "𝐻", + "I": "𝐼", + "J": "𝐽", + "K": "𝐾", + "L": "𝐿", + "M": "𝑀", + "N": "𝑁", + "O": "𝑂", + "P": "𝑃", + "Q": "𝑄", + "R": "𝑅", + "S": "𝑆", + "T": "𝑇", + "U": "𝑈", + "V": "𝑉", + "W": "𝑊", + "X": "𝑋", + "Y": "𝑌", + "Z": "𝑍", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "+": "+", + "=": "=", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "/": "/", + "\\": "\\", + "@": "@", + "#": "⁎", + "$": "₽", + "%": "%", + "^": "^", + "&": "⁊", + "*": "*", + "_": "_", + "'": "'", + "\"": "\"", + ":": ":", + ";": ";", + "~": "~", + "|": "|", + "<": "<", + ">": ">" + }, + "serifBoldItalic": { + "0": "𝟎", + "1": "𝟏", + "2": "𝟐", + "3": "𝟑", + "4": "𝟒", + "5": "𝟓", + "6": "𝟔", + "7": "𝟕", + "8": "𝟖", + "9": "𝟗", + "a": "𝒶", + "b": "𝒷", + "c": "𝒸", + "d": "𝒹", + "e": "𝒺", + "f": "𝒻", + "g": "𝒼", + "h": "𝒽", + "i": "𝒾", + "j": "𝒿", + "k": "𝒦", + "l": "𝒷", + "m": "𝒸", + "n": "𝒹", + "o": "𝒺", + "p": "𝒻", + "q": "𝒼", + "r": "𝒽", + "s": "𝒾", + "t": "𝒿", + "u": "𝒦", + "v": "𝒷", + "w": "𝒸", + "x": "𝒹", + "y": "𝒺", + "z": "𝒻", + "A": "𝑨", + "B": "𝑩", + "C": "𝑪", + "D": "𝑫", + "E": "𝑬", + "F": "𝑭", + "G": "𝑮", + "H": "𝑯", + "I": "𝑰", + "J": "𝑱", + "K": "𝑲", + "L": "𝑳", + "M": "𝑴", + "N": "𝑵", + "O": "𝑶", + "P": "𝑷", + "Q": "𝑶", + "R": "𝑹", + "S": "𝑺", + "T": "𝑻", + "U": "𝑼", + "V": "𝑽", + "W": "𝑾", + "X": "𝑿", + "Y": "𝑰", + "Z": "𝑍", + ".": ".", + ",": ",", + "?": "?", + "!": "!", + "-": "-", + "+": "+", + "=": "=", + "(": "(", + ")": ")", + "[": "[", + "]": "]", + "{": "{", + "}": "}", + "/": "/", + "\\": "\\", + "@": "@", + "#": "⁎", + "$": "₽", + "%": "%", + "^": "^", + "&": "⁊", + "*": "*", + "_": "_", + "'": "'", + "\"": "\"", + ":": ":", + ";": ";", + "~": "~", + "|": "|", + "<": "<", + ">": ">" + }, "smallCaps": { "0": "₀", "1": "₁", @@ -1444,3 +2555,73 @@ export const transforms = { "°": "°" } }; + +export const fontKeys = [ + "circled", + "circledNegative", + "doubleStruck", + "fraktur", + "frakturBold", + "inverted", + "mathematicalBold", + "mathematicalItalic", + "mathematicalBoldItalic", + "mirrored", + "monospace", + "parenthesized", + "sans", + "sansBold", + "sansItalic", + "sansBoldItalic", + "sansSerif", + "sansSerifBold", + "sansSerifItalic", + "sansSerifBoldItalic", + "script", + "boldScript", + "serif", + "serifBold", + "serifItalic", + "serifBoldItalic", + "smallCaps", + "squared", + "squaredNegative", + "subscript", + "superscript" +] as const; + +export type FontKey = typeof fontKeys[number]; + +export const fonts: Record = { + "circled": "Circled", + "circledNegative": "Circled Negative", + "doubleStruck": "Double Struck", + "fraktur": "Fraktur", + "frakturBold": "Fraktur Bold", + "inverted": "Inverted", + "mathematicalBold": "Mathematical Bold", + "mathematicalItalic": "Mathematical Italic", + "mathematicalBoldItalic": "Mathematical Bold Italic", + "mirrored": "Mirrored", + "monospace": "Monospace", + "parenthesized": "Parenthesized", + "sans": "Sans", + "sansBold": "Sans Bold", + "sansItalic": "Sans Italic", + "sansBoldItalic": "Sans Bold Italic", + "sansSerif": "Sans Serif", + "sansSerifBold": "Sans Serif Bold", + "sansSerifItalic": "Sans Serif Italic", + "sansSerifBoldItalic": "Sans Serif Bold Italic", + "script": "Script", + "boldScript": "Bold Script", + "serif": "Serif", + "serifBold": "Serif Bold", + "serifItalic": "Serif Italic", + "serifBoldItalic": "Serif Bold Italic", + "smallCaps": "Small Caps", + "squared": "Squared", + "squaredNegative": "Squared Negative", + "subscript": "Subscript", + "superscript": "Superscript" +};