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: include updated sbb fonts #3312

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
6 changes: 3 additions & 3 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Roman.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Bold.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Light.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
Expand Down
12 changes: 6 additions & 6 deletions src/elements/core/styles/mixins/font-face.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
@font-face {
font-family: SBB;
src:
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff') format('woff');
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Roman.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Roman.woff') format('woff');
font-display: fallback;
font-weight: 400;
}

@font-face {
font-family: SBB;
src:
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff') format('woff');
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Bold.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Bold.woff') format('woff');
font-display: swap;
font-weight: 700;
}

@font-face {
font-family: SBB;
src:
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff') format('woff');
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Light.woff2') format('woff2'),
url('https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Light.woff') format('woff');
font-display: swap;
font-weight: 300;
}
Expand Down
6 changes: 3 additions & 3 deletions src/visual-regression-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
<base href="/" />
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Roman.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Bold.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Light.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
Expand Down
6 changes: 3 additions & 3 deletions tools/web-test-runner/preload-fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const cacheLocation = resolve(
'../../node_modules/.cache/lyne-cdn-fonts',
);
const preloadFontList = [
[400, 'https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff2'],
[700, 'https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff2'],
[300, 'https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff2'],
[400, 'https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Roman.woff2'],
[700, 'https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Bold.woff2'],
[300, 'https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-Light.woff2'],
] as const;

export interface PreloadedFont {
Expand Down
2 changes: 1 addition & 1 deletion web-test-runner.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const testRunnerHtml = (
(type) => `
<link
rel="preload"
href="https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-${type}.woff2"
href="https://cdn.app.sbb.ch/fonts/v1_8_1_subset/SBBWeb-${type}.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
Expand Down
Loading