57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
/** Same packaged font bytes are used in browser previews and FFmpeg exports. */
|
|
export const captionFonts = [
|
|
{
|
|
id: "source-han",
|
|
name: "Source Han Sans CN",
|
|
family: "Source Han Sans SC",
|
|
file: "source-han.otf",
|
|
common: true,
|
|
recommended: true,
|
|
google: false,
|
|
},
|
|
{
|
|
id: "noto-sans-sc",
|
|
name: "Noto Sans SC",
|
|
family: "Noto Sans SC",
|
|
file: "noto-sans-sc.ttf",
|
|
common: true,
|
|
recommended: true,
|
|
google: true,
|
|
},
|
|
{
|
|
id: "noto-serif-sc",
|
|
name: "Noto Serif SC",
|
|
family: "Noto Serif SC",
|
|
file: "noto-serif-sc.ttf",
|
|
common: true,
|
|
recommended: true,
|
|
google: true,
|
|
},
|
|
{
|
|
id: "roboto",
|
|
name: "Roboto",
|
|
family: "Roboto",
|
|
file: "roboto.ttf",
|
|
common: true,
|
|
recommended: false,
|
|
google: true,
|
|
},
|
|
{
|
|
id: "inter",
|
|
name: "Inter",
|
|
family: "Inter",
|
|
file: "inter.ttf",
|
|
common: true,
|
|
recommended: false,
|
|
google: true,
|
|
},
|
|
] as const;
|
|
export const captionFontIds = [
|
|
"source-han",
|
|
"noto-sans-sc",
|
|
"noto-serif-sc",
|
|
"roboto",
|
|
"inter",
|
|
] as const;
|
|
export const captionFont = (id?: string) => captionFonts.find((font) => font.id === id);
|