Skip to content

Commit 887c9ab

Browse files
committed
feat: add new fonts
1 parent c4a4c2d commit 887c9ab

File tree

4 files changed

+60
-14
lines changed

4 files changed

+60
-14
lines changed

apps/codeimage/changelog/1-8-3_12-23-2024.mdx

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {mdxComponents} from '../src/mdx/components';
2+
3+
# v1.8.4
4+
5+
<mdxComponents.h3>💬 New fonts</mdxComponents.h3>
6+
7+
This new version of CodeImage introduces new fonts into it's core:
8+
- [Geist Mono](https://vercel.com/font)
9+
- [IBM Plex Mono](https://github.com/IBM/plex)
10+
- [Agave](https://github.com/blobject/agave)
11+
- [Monaspace](https://monaspace.githubnext.com/) (all versions: Argon, Krypton, Neon, Radon, Xenon)
12+
13+
14+
### 🎆 New CSS logo
15+
16+
`.css` extension icon has been updated with the new official [CSS logo](https://github.com/CSS-Next/logo.css)
17+
18+
19+
### 🤖 New languages
20+
21+
This new version of CodeImage introduces support for new languages:
22+
- Visual Basic
23+
- Pascal
24+
25+
The PHP language has been updated to highlight syntax without `<?` opening tag.

apps/codeimage/src/core/configuration/font.ts

+19
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export const [SUPPORTED_FONTS, SUPPORTED_FONTS_DICTIONARY] = createCustomFonts([
5454
{name: 'Bold', weight: 700},
5555
],
5656
},
57+
{
58+
id: 'agave',
59+
name: 'Agave',
60+
type: 'web',
61+
types: [{name: 'Regular', weight: 400}],
62+
},
5763
{
5864
id: 'fira-code',
5965
name: 'Fira Code',
@@ -112,4 +118,17 @@ export const [SUPPORTED_FONTS, SUPPORTED_FONTS_DICTIONARY] = createCustomFonts([
112118
{name: 'Bold', weight: 700},
113119
],
114120
},
121+
...['Argon', 'Krypton', 'Neon', 'Radon', 'Xenon'].map(
122+
font =>
123+
({
124+
id: `monaspace-${font}`,
125+
name: `Monaspace ${font}`,
126+
type: 'web',
127+
types: [
128+
{name: 'Regular', weight: 400},
129+
{name: 'Medium', weight: 500},
130+
{name: 'Bold', weight: 700},
131+
],
132+
} as const),
133+
),
115134
] as const);

apps/codeimage/src/theme/global.css.ts

+16
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,19 @@ globalFontFace('Geist Mono', {
6868
src: `url(/assets/fonts/IBM_Plex_Mono/IBMPlexMono-${font}.ttf) format('truetype')`,
6969
});
7070
});
71+
72+
globalFontFace('Agave', {
73+
fontDisplay: 'swap',
74+
fontWeight: 400,
75+
fontStyle: 'normal',
76+
src: `url(/assets/fonts/agave/Agave-Regular.ttf) format('truetype')`,
77+
});
78+
79+
(['Argon', 'Krypton', 'Neon', 'Radon', 'Xenon'] as const).forEach(font => {
80+
globalFontFace(`Monaspace ${font}`, {
81+
fontDisplay: 'swap',
82+
fontWeight: '400 700',
83+
fontStyle: 'normal',
84+
src: `url(/assets/fonts/monaspace/Monaspace${font}VarVF[wght,wdth,slnt].ttf) format('truetype')`,
85+
});
86+
});

0 commit comments

Comments
 (0)