Skip to content

Commit 8df348e

Browse files
committed
feat: add HelsinkiGroteskPro variable font
Refs: LINK-2463
1 parent 434e495 commit 8df348e

2 files changed

Lines changed: 93 additions & 4 deletions

File tree

.env.local.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NEXT_PUBLIC_SIGNUPS_LOGIN_METHODS=helsinki_tunnus,helsinkiad
2727
# Content Security Policy (CSP) configuration
2828
# Full CSP policy string. If not set, no CSP headers will be added.
2929
# Set `sentry_key` parameter value for report-uri
30-
#NEXT_CSP_POLICY=connect-src 'self' https://linkedevents.api.dev.hel.ninja https://sentry.test.hel.ninja https://tunnistus.test.hel.ninja; default-src 'none'; font-src https://makasiini.hel.ninja; form-action 'self'; frame-ancestors 'self'; img-src 'self' data:; report-uri https://sentry.test.hel.ninja/api/167/security/?sentry_key=YOUR_KEY&sentry_environment=development; script-src 'self' https://matomo.hel.fi 'unsafe-hashes' 'sha256-7Hm4kDnuwRKq0GkRVBPz6YL9PvbRT9e9rAqI5RnLzBQ='; style-src 'self' 'unsafe-inline'; base-uri 'self'
30+
#NEXT_CSP_POLICY=connect-src 'self' https://linkedevents.api.dev.hel.ninja https://sentry.test.hel.ninja https://tunnistus.test.hel.ninja; default-src 'none'; font-src https://makasiini.hel.ninja https://makasiini.hel.fi; form-action 'self'; frame-ancestors 'self'; img-src 'self' data:; report-uri https://sentry.test.hel.ninja/api/167/security/?sentry_key=YOUR_KEY&sentry_environment=development; script-src 'self' https://matomo.hel.fi 'unsafe-hashes' 'sha256-7Hm4kDnuwRKq0GkRVBPz6YL9PvbRT9e9rAqI5RnLzBQ='; style-src 'self' 'unsafe-inline'; base-uri 'self'
3131

3232
# Set to 'false' to enforce CSP, otherwise defaults to report-only mode
3333
#NEXT_CSP_REPORT_ONLY=true

src/styles/fonts.scss

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,98 @@
7676
text-rendering: optimizeLegibility;
7777
}
7878

79-
$hel-grotesk: 'HelsinkiGrotesk', Arial, -apple-system, BlinkMacSystemFont,
80-
'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
81-
'Droid Sans', 'Helvetica Neue', sans-serif;
79+
/*
80+
* HelsinkiGroteskPro variable font (font file served from CDN).
81+
* Regular (400), Medium (500), Bold (700), Black (900), each normal and italic.
82+
* Font axes (fvar): wght 200–900, ital 0–1.
83+
*/
84+
@font-face {
85+
font-display: swap;
86+
font-family: HelsinkiGroteskPro;
87+
font-style: normal;
88+
font-weight: 400;
89+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
90+
format('woff2');
91+
text-rendering: optimizeLegibility;
92+
}
93+
@font-face {
94+
font-display: swap;
95+
font-family: HelsinkiGroteskPro;
96+
font-style: italic;
97+
font-weight: 400;
98+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
99+
format('woff2');
100+
text-rendering: optimizeLegibility;
101+
}
102+
@font-face {
103+
font-display: swap;
104+
font-family: HelsinkiGroteskPro;
105+
font-style: normal;
106+
font-weight: 500;
107+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
108+
format('woff2');
109+
text-rendering: optimizeLegibility;
110+
}
111+
@font-face {
112+
font-display: swap;
113+
font-family: HelsinkiGroteskPro;
114+
font-style: italic;
115+
font-weight: 500;
116+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
117+
format('woff2');
118+
text-rendering: optimizeLegibility;
119+
}
120+
@font-face {
121+
font-display: swap;
122+
font-family: HelsinkiGroteskPro;
123+
font-style: normal;
124+
font-weight: 700;
125+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
126+
format('woff2');
127+
text-rendering: optimizeLegibility;
128+
}
129+
@font-face {
130+
font-display: swap;
131+
font-family: HelsinkiGroteskPro;
132+
font-style: italic;
133+
font-weight: 700;
134+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
135+
format('woff2');
136+
text-rendering: optimizeLegibility;
137+
}
138+
@font-face {
139+
font-display: swap;
140+
font-family: HelsinkiGroteskPro;
141+
font-style: normal;
142+
font-weight: 900;
143+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
144+
format('woff2');
145+
text-rendering: optimizeLegibility;
146+
}
147+
@font-face {
148+
font-display: swap;
149+
font-family: HelsinkiGroteskPro;
150+
font-style: italic;
151+
font-weight: 900;
152+
src: url('https://makasiini.hel.fi/delivery/917fc4ffc37c44d31b143244042e0078/9a677fe2c4414b1a40990971cd4ac24c.woff2')
153+
format('woff2');
154+
text-rendering: optimizeLegibility;
155+
}
156+
157+
$hel-grotesk:
158+
'HelsinkiGrotesk',
159+
Arial,
160+
-apple-system,
161+
BlinkMacSystemFont,
162+
'Segoe UI',
163+
'Roboto',
164+
'Oxygen',
165+
'Ubuntu',
166+
'Cantarell',
167+
'Fira Sans',
168+
'Droid Sans',
169+
'Helvetica Neue',
170+
sans-serif;
82171

83172
// Application font:
84173
$font-family-base: $hel-grotesk;

0 commit comments

Comments
 (0)