Skip to content

Commit

Permalink
HZC-5159: add self hosted fonts (#503)
Browse files Browse the repository at this point in the history
* add self hosted fonts

* add self hosted fonts
  • Loading branch information
fantkolja authored Aug 7, 2023
1 parent cb2f7b9 commit 9051e8e
Show file tree
Hide file tree
Showing 59 changed files with 40,487 additions and 671 deletions.
40,412 changes: 40,412 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/icons/.storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const customTheme = create({
appBorderRadius: 3,

// Typography
fontBase: "'Open Sans', 'Roboto', 'Helvetica', 'Arial', sans-serif",
fontBase: "'Open Sans', 'PP Telegraf', 'Helvetica', 'Arial', sans-serif",
fontCode: 'sans-serif',

// Text colors
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')

module.exports = {
stories: ['../**/*.stories.@(tsx|mdx)'],
staticDirs: ['../assets'],
staticDirs: ['../assets', '../styles'],
addons: [
{
name: '@storybook/preset-scss',
Expand Down
53 changes: 2 additions & 51 deletions packages/ui/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,51 +1,2 @@
<style type="text/css">
/* roboto-400 */
@font-face {
font-family: Roboto;
font-style: normal;
font-weight: 400;
src: url('./fonts/roboto-v27-latin-regular.woff2') format('woff2'), url('./fonts/roboto-v27-latin-regular.woff') format('woff'),
url('./fonts/roboto-v27-latin-regular.ttf') format('truetype'), url('./fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}

/* roboto-500 */
@font-face {
font-family: Roboto;
font-style: normal;
font-weight: 500;
src: url('./fonts/roboto-v27-latin-500.woff2') format('woff2'), url('./fonts/roboto-v27-latin-500.woff') format('woff'),
url('./fonts/roboto-v27-latin-500.ttf') format('truetype'), url('./fonts/roboto-v27-latin-500.svg#Roboto') format('svg'); /* Legacy iOS */
}

/* open sans-400 */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('./fonts/OpenSans-Regular.woff2') format('woff2');
}

/* open sans-400 */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: url('./fonts/OpenSans-Italic.woff2') format('woff2');
}

/* open sans-600 */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: url('./fonts/OpenSans-SemiBold.woff2') format('woff2');
}

/* open sans-600 */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
src: url('./fonts/OpenSans-SemiBoldItalic.woff2') format('woff2');
}
</style>
<link rel='stylesheet' type="text/css" href='./typography/open-sans.css'>
<link rel='stylesheet' type="text/css" href='./typography/pp-telegraf.css'>
2 changes: 1 addition & 1 deletion packages/ui/.storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const customTheme = create({
appBorderRadius: 3,

// Typography
fontBase: "'Open Sans', 'Roboto', 'Helvetica', 'Arial', sans-serif",
fontBase: "'Open Sans', 'PP Telegraf', 'Helvetica', 'Arial', sans-serif",
fontCode: 'sans-serif',

// Text colors
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/__stories__/Typography.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getSampleText = (letterSpacing) => (

## Headings

**Font:** Roboto
**Font:** PP Telegraf

**Weight:** regular

Expand All @@ -32,7 +32,7 @@ export const getSampleText = (letterSpacing) => (
fontFamily={styleConsts.fontFamilyHeading}
/>

**Font:** Roboto
**Font:** PP Telegraf

**Weight:** bold

Expand Down Expand Up @@ -74,4 +74,4 @@ export const getSampleText = (letterSpacing) => (
fontWeight={styleConsts.fontWeightTextBold}
sampleText={getSampleText()}
fontFamily={styleConsts.fontFamilyText}
/>
/>
305 changes: 0 additions & 305 deletions packages/ui/assets/fonts/roboto-v27-latin-500.svg
Diff not rendered.
Binary file removed packages/ui/assets/fonts/roboto-v27-latin-500.ttf
Binary file not shown.
Binary file removed packages/ui/assets/fonts/roboto-v27-latin-500.woff
Binary file not shown.
Binary file removed packages/ui/assets/fonts/roboto-v27-latin-500.woff2
Binary file not shown.
308 changes: 0 additions & 308 deletions packages/ui/assets/fonts/roboto-v27-latin-regular.svg
Diff not rendered.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/ui/styles/constants/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$fontFamilyHeading: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
$fontFamilyHeading: 'PP Telegraf', 'Helvetica', 'Arial', sans-serif !default;
$fontWeightHeadingRegular: 400 !default;
$fontWeightHeadingBold: 500 !default;
$fontFamilyText: 'Open Sans', 'Helvetica', 'Arial', sans-serif !default;
Expand Down
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions packages/ui/styles/typography/open-sans.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* open sans-400 */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('./fonts/OpenSans-Regular.woff2') format('woff2');
}

/* open sans-400 */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./fonts/OpenSans-Italic.woff2') format('woff2');
}

/* open sans-600 */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('./fonts/OpenSans-SemiBold.woff2') format('woff2');
}

/* open sans-600 */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url('./fonts/OpenSans-SemiBoldItalic.woff2') format('woff2');
}
31 changes: 31 additions & 0 deletions packages/ui/styles/typography/pp-telegraf.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@font-face {
font-family: 'PP Telegraf';
font-style: normal;
font-display: swap;
font-weight: 400;
src: url('./fonts/PPTelegraf-Light.woff2') format('woff2');
}

@font-face {
font-family: 'PP Telegraf';
font-style: italic;
font-display: swap;
font-weight: 400;
src: url('./fonts/PPTelegraf-UltralightSlanted.woff2') format('woff2');
}

@font-face {
font-family: 'PP Telegraf';
font-style: normal;
font-display: swap;
font-weight: 500;
src: url('./fonts/PPTelegraf-Medium.woff2') format('woff2');
}

@font-face {
font-family: 'PP Telegraf';
font-style: italic;
font-display: swap;
font-weight: 500;
src: url('./fonts/PPTelegraf-RegularSlanted.woff2') format('woff2');
}

0 comments on commit 9051e8e

Please sign in to comment.