Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more fonts #373

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added web/public/fonts/Recursive_VF_1.085.woff2
Binary file not shown.
Binary file added web/public/fonts/comic-mono/ComicMono-Bold.ttf
Binary file not shown.
Binary file added web/public/fonts/comic-mono/ComicMono.ttf
Binary file not shown.
Binary file added web/public/fonts/hack/hack-bold.woff
Binary file not shown.
Binary file added web/public/fonts/hack/hack-bold.woff2
Binary file not shown.
Binary file added web/public/fonts/hack/hack-bolditalic.woff
Binary file not shown.
Binary file added web/public/fonts/hack/hack-bolditalic.woff2
Binary file not shown.
Binary file added web/public/fonts/hack/hack-italic.woff
Binary file not shown.
Binary file added web/public/fonts/hack/hack-italic.woff2
Binary file not shown.
Binary file added web/public/fonts/hack/hack-regular.woff
Binary file not shown.
Binary file added web/public/fonts/hack/hack-regular.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added web/public/fonts/zed-mono/zed-mono-extended.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
126 changes: 125 additions & 1 deletion web/src/services/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface FontDeclaration {
label: string
family: string
fonts: Array<{
src: Array<{ url: string; format?: 'opentype' | 'embedded-opentype' | 'woff' | 'truetype' | 'svg' }>
src: Array<{ url: string; format?: 'opentype' | 'embedded-opentype' | 'woff' | 'woff2' | 'truetype' | 'svg' }>
weight?: 'normal' | 'bold' | 'light' | number
style?: 'normal' | 'italic'
}>
Expand All @@ -42,6 +42,20 @@ const fontsList: Record<string, FontDeclaration> = {
},
],
},
'Comic-Mono': {
label: 'Comic Mono',
family: 'Comic Mono',
fonts: [
{
src: [{ url: '/fonts/comic-mono/ComicMono.ttf', format: 'truetype' }],
weight: 400,
},
{
src: [{ url: '/fonts/comic-mono/ComicMono-Bold.ttf', format: 'truetype' }],
weight: 700,
},
],
},
FiraCode: {
label: 'Fira Code',
family: 'FiraCode',
Expand All @@ -64,6 +78,75 @@ const fontsList: Record<string, FontDeclaration> = {
},
],
},
Hack: {
label: 'Hack',
family: 'Hack',
fonts: [
{
src: [
{ url: '/fonts/hack/hack-regular.woff', format: 'woff' },
{ url: '/fonts/hack/hack-regular.woff2', format: 'woff2' },
],
weight: 400,
},
{
src: [
{ url: '/fonts/hack/hack-italic.woff', format: 'woff' },
{ url: '/fonts/hack/hack-italic.woff2', format: 'woff2' },
],
weight: 400,
style: 'italic',
},
{
src: [
{ url: '/fonts/hack/hack-bold.woff', format: 'woff' },
{ url: '/fonts/hack/hack-bold.woff2', format: 'woff2' },
],
weight: 700,
},
{
src: [
{ url: '/fonts/hack/hack-bolditalic.woff', format: 'woff' },
{ url: '/fonts/hack/hack-bolditalic.woff2', format: 'woff2' },
],
weight: 700,
style: 'italic',
},
],
},
'IBM-Plex': {
label: 'IBM Plex Mono',
family: 'IBM Plex Mono',
fonts: [
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-Regular.woff2', format: 'woff2' }],
weight: 400,
},
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-Italic.woff2', format: 'woff2' }],
weight: 400,
style: 'italic',
},
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-Medium.woff2', format: 'woff2' }],
weight: 500,
},
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-MediumItalic.woff2', format: 'woff2' }],
weight: 500,
style: 'italic',
},
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-Bold.woff2', format: 'woff2' }],
weight: 700,
},
{
src: [{ url: '/fonts/ibm-plex-mono/IBMPlexMono-BoldItalic.woff2', format: 'woff2' }],
weight: 700,
style: 'italic',
},
],
},
'JetBrains-Mono': {
label: 'JetBrains Mono',
family: 'JetBrains-Mono',
Expand All @@ -82,6 +165,47 @@ const fontsList: Record<string, FontDeclaration> = {
},
],
},
Recursive: {
label: 'Recursive',
family: 'Recursive',
fonts: [
{
src: [{ url: '/fonts/Recursive_VF_1.085.woff2', format: 'woff2' }],
},
],
},
'Zed-Mono': {
label: 'Zed Mono',
family: 'Zed Mono',
fonts: [
{
src: [{ url: '/fonts/zed-mono/zed-mono-extended.ttf', format: 'truetype' }],
weight: 400,
},
{
src: [{ url: '/fonts/zed-mono/zed-mono-extendeditalic.ttf', format: 'truetype' }],
weight: 400,
style: 'italic',
},
{
src: [{ url: '/fonts/zed-mono/zed-mono-extendedmedium.ttf', format: 'truetype' }],
weight: 500,
},
{
src: [{ url: '/fonts/zed-mono/zed-mono-extendedsemibold.ttf', format: 'truetype' }],
weight: 600,
},
{
src: [{ url: '/fonts/zed-mono/zed-mono-extendedbold.ttf', format: 'truetype' }],
weight: 700,
},
{
src: [{ url: '/fonts/zed-mono/zed-mono-extendedbolditalic.ttf', format: 'truetype' }],
weight: 700,
style: 'italic',
},
],
},
}

/**
Expand Down
Loading