Skip to content

Commit

Permalink
feat: include updated sbb fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Dec 18, 2024
1 parent ee4494f commit af4d426
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
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

0 comments on commit af4d426

Please sign in to comment.