@synergy-design-system/mcp 1.30.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/build/build.js +2 -0
- package/dist/build/fonts.d.ts +4 -0
- package/dist/build/fonts.js +49 -0
- package/dist/tools/font-info.d.ts +6 -0
- package/dist/tools/font-info.js +35 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -0
- package/dist/utilities/config.d.ts +4 -0
- package/dist/utilities/config.js +4 -0
- package/dist/utilities/fonts.d.ts +2 -0
- package/dist/utilities/fonts.js +3 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +1 -0
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/assets/README.md +4 -2
- package/metadata/packages/components/components/syn-details/component.custom.styles.ts +2 -9
- package/metadata/packages/components/migration/migration-synergy-v3.md +234 -49
- package/metadata/packages/components/static/CHANGELOG.md +8 -0
- package/metadata/packages/fonts/CHANGELOG.md +12 -0
- package/metadata/packages/fonts/README.md +157 -0
- package/metadata/packages/fonts/package.json +72 -0
- package/metadata/packages/tokens/dark.css +1 -1
- package/metadata/packages/tokens/index.js +1 -1
- package/metadata/packages/tokens/light.css +1 -1
- package/metadata/packages/tokens/sick2018_dark.css +1 -1
- package/metadata/packages/tokens/sick2018_light.css +1 -1
- package/metadata/packages/tokens/sick2025_dark.css +1 -1
- package/metadata/packages/tokens/sick2025_light.css +1 -1
- package/metadata/static/fonts/index.md +4 -0
- package/metadata/static/setup/prerequisites.md +179 -122
- package/metadata/static/templates/appshell.md +40 -40
- package/metadata/static/templates/footer.md +10 -10
- package/package.json +3 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# @synergy-design-system/fonts
|
|
2
|
+
|
|
3
|
+
This package provides the SICK Intl font family required for Synergy 3.0 and later versions. The font is distributed with pre-built CSS files for easy integration into any project.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the fonts package as a dependency:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save @synergy-design-system/fonts
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Basic Usage
|
|
16
|
+
|
|
17
|
+
Import the complete font family with all weights:
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
// The default export will load SICK Intl automatically.
|
|
21
|
+
import "@synergy-design-system/fonts";
|
|
22
|
+
|
|
23
|
+
// You may also use a direct import instead.
|
|
24
|
+
// Use this if your bundler does not understand JavaScript module syntax
|
|
25
|
+
import "@synergy-design-system/fonts/src/sick-intl/font.css";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This will load both Regular (400) and Semi Bold (600) font weights with proper `@font-face` declarations.
|
|
29
|
+
|
|
30
|
+
### CSS Import
|
|
31
|
+
|
|
32
|
+
If you prefer CSS imports, you can use:
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@import "@synergy-design-system/fonts/src/sick-intl/font.css";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Inline Base64 Version (Self-Contained)
|
|
39
|
+
|
|
40
|
+
For applications that need **fully self-contained CSS without external font file dependencies**, use the automatically generated inline version:
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import "@synergy-design-system/fonts/sick-intl-inline.css";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This version includes the font files as base64-encoded data URIs directly in the CSS, eliminating the need for separate font file hosting. **Note:** This increases CSS file size but removes external dependencies.
|
|
47
|
+
|
|
48
|
+
### Framework Examples
|
|
49
|
+
|
|
50
|
+
#### Vite
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
// main.tsx
|
|
54
|
+
import "@synergy-design-system/fonts";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Angular
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
// In angular.json
|
|
61
|
+
"styles": [
|
|
62
|
+
"@synergy-design-system/fonts/src/sick-intl/font.css",
|
|
63
|
+
]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### CSS Usage
|
|
67
|
+
|
|
68
|
+
After importing the fonts, use the `SICK Intl` font family in your CSS:
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
body {
|
|
72
|
+
font-family:
|
|
73
|
+
"SICK Intl",
|
|
74
|
+
-apple-system,
|
|
75
|
+
BlinkMacSystemFont,
|
|
76
|
+
sans-serif;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.heading {
|
|
80
|
+
font-family: "SICK Intl";
|
|
81
|
+
font-weight: 600; /* Semi Bold */
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.body-text {
|
|
85
|
+
font-family: "SICK Intl";
|
|
86
|
+
font-weight: 400; /* Regular */
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Available Font Weights
|
|
91
|
+
|
|
92
|
+
- **400 (Regular):** Used for body text and standard content
|
|
93
|
+
- **600 (Semi Bold):** Used for headings, emphasized text, and UI elements
|
|
94
|
+
|
|
95
|
+
## File Structure
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
dist/
|
|
99
|
+
├── sick-intl-inline.css # Base64 inline version (git ignored)
|
|
100
|
+
src/
|
|
101
|
+
└── sick-intl/
|
|
102
|
+
├── font.css # Default font face definitions
|
|
103
|
+
├── SICKIntl-Regular.woff2 # Regular font
|
|
104
|
+
└── SICKIntl-SemiBold.woff2 # Semibold font
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Browser Support
|
|
108
|
+
|
|
109
|
+
The font files are provided in WOFF2 format, which is supported by:
|
|
110
|
+
|
|
111
|
+
- Chrome 36+
|
|
112
|
+
- Firefox 39+
|
|
113
|
+
- Safari 12+
|
|
114
|
+
- Edge 14+
|
|
115
|
+
|
|
116
|
+
For older browser support, consider using the CDN version or hosting additional font formats.
|
|
117
|
+
|
|
118
|
+
## CDN Alternative
|
|
119
|
+
|
|
120
|
+
If you prefer not to bundle fonts with your application, you can load them from the SICK CDN:
|
|
121
|
+
|
|
122
|
+
```css
|
|
123
|
+
@font-face {
|
|
124
|
+
font-display: swap;
|
|
125
|
+
font-family: "SICK Intl";
|
|
126
|
+
font-style: normal;
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2")
|
|
129
|
+
format("woff2");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@font-face {
|
|
133
|
+
font-display: swap;
|
|
134
|
+
font-family: "SICK Intl";
|
|
135
|
+
font-style: normal;
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2")
|
|
138
|
+
format("woff2");
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Performance Considerations
|
|
143
|
+
|
|
144
|
+
- **Standard version:** Loads font files separately, better for caching
|
|
145
|
+
- **Inline version:** Self-contained but larger CSS file size
|
|
146
|
+
- **CDN version:** Fastest initial load but requires network connectivity
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
This package uses PostCSS to generate multiple font distribution formats:
|
|
153
|
+
|
|
154
|
+
- Standard CSS with external font files
|
|
155
|
+
- Base64 inline CSS for self-contained usage
|
|
156
|
+
|
|
157
|
+
The inline version is automatically generated during build and includes the font files as data URIs.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"name": "SICK Global UX Foundation",
|
|
4
|
+
"url": "https://www.sick.com"
|
|
5
|
+
},
|
|
6
|
+
"description": "Fonts for Synergy, the SICK Design System",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@synergy-design-system/eslint-config-syn": "workspace:^",
|
|
9
|
+
"@synergy-design-system/stylelint-config-syn": "workspace:^",
|
|
10
|
+
"eslint": "^8.57.1",
|
|
11
|
+
"ora": "^8.2.0",
|
|
12
|
+
"postcss": "^8.5.6",
|
|
13
|
+
"postcss-header": "^3.0.3",
|
|
14
|
+
"postcss-import": "^16.1.1",
|
|
15
|
+
"postcss-url": "^10.1.3",
|
|
16
|
+
"stylelint": "^16.24.0"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./src/sick-intl/font.css",
|
|
21
|
+
"default": "./src/sick-intl/font.css"
|
|
22
|
+
},
|
|
23
|
+
"./sick-intl.css": {
|
|
24
|
+
"import": "./src/sick-intl/font.css",
|
|
25
|
+
"default": "./src/sick-intl/font.css"
|
|
26
|
+
},
|
|
27
|
+
"./sick-intl-inline.css": {
|
|
28
|
+
"import": "./dist/sick-intl-inline.css",
|
|
29
|
+
"default": "./dist/sick-intl-inline.css"
|
|
30
|
+
},
|
|
31
|
+
"./src/*": {
|
|
32
|
+
"import": "./src/*",
|
|
33
|
+
"default": "./src/*"
|
|
34
|
+
},
|
|
35
|
+
"./dist/*": {
|
|
36
|
+
"import": "./dist/*",
|
|
37
|
+
"default": "./dist/*"
|
|
38
|
+
},
|
|
39
|
+
"./package.json": {
|
|
40
|
+
"import": "./package.json",
|
|
41
|
+
"default": "./package.json"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"src",
|
|
47
|
+
"CHANGELOG.md",
|
|
48
|
+
"NOTICE"
|
|
49
|
+
],
|
|
50
|
+
"homepage": "https://synergy-design-system.github.io",
|
|
51
|
+
"keywords": [
|
|
52
|
+
"SDS",
|
|
53
|
+
"SICK",
|
|
54
|
+
"Synergy Design System",
|
|
55
|
+
"SICK Fonts"
|
|
56
|
+
],
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"name": "@synergy-design-system/fonts",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "https://github.com/synergy-design-system/synergy-design-system.git",
|
|
62
|
+
"directory": "packages/fonts"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "node scripts/build.js",
|
|
66
|
+
"lint:css": "stylelint \"src/**/*.css\"",
|
|
67
|
+
"lint:js": "eslint .",
|
|
68
|
+
"lint": "pnpm run /^lint:.*/"
|
|
69
|
+
},
|
|
70
|
+
"type": "module",
|
|
71
|
+
"version": "1.0.0"
|
|
72
|
+
}
|
|
@@ -2,27 +2,131 @@
|
|
|
2
2
|
|
|
3
3
|
## Fonts
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Synergy Design System uses these typefaces:
|
|
6
6
|
|
|
7
7
|
| Theme | Typeface |
|
|
8
8
|
| --------- | ----------- |
|
|
9
9
|
| SICK 2018 | `Open Sans` |
|
|
10
10
|
| SICK 2025 | `SICK Intl` |
|
|
11
11
|
|
|
12
|
-
For
|
|
12
|
+
For SICK 2025, see [SICK Brand Portal](https://brand.sick.com/document/145#/basiselemente/typografie/sick-intl) for style usage (regular, semi-bold, etc).
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
You need to include it into your own project.
|
|
14
|
+
---
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
## SICK 2018 Theme (Open Sans)
|
|
18
17
|
|
|
19
|
-
###
|
|
18
|
+
### Using `@fontsource` npm packages (Recommended)
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Install the `@fontsource/open-sans` package into your project:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @fontsource/open-sans
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Vite/Webpack
|
|
27
|
+
|
|
28
|
+
```javascript
|
|
29
|
+
import "@fontsource/open-sans/400.css";
|
|
30
|
+
import "@fontsource/open-sans/400-italic.css";
|
|
31
|
+
import "@fontsource/open-sans/600.css";
|
|
32
|
+
import "@fontsource/open-sans/600-italic.css";
|
|
33
|
+
import "@fontsource/open-sans/700.css";
|
|
34
|
+
import "@fontsource/open-sans/700-italic.css";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Angular
|
|
38
|
+
|
|
39
|
+
Add to your `angular.json` file:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"projects": {
|
|
44
|
+
"project_name": {
|
|
45
|
+
"architect": {
|
|
46
|
+
"build": {
|
|
47
|
+
"options": {
|
|
48
|
+
"styles": [
|
|
49
|
+
"@fontsource/open-sans/400.css",
|
|
50
|
+
"@fontsource/open-sans/400-italic.css",
|
|
51
|
+
"@fontsource/open-sans/600.css",
|
|
52
|
+
"@fontsource/open-sans/600-italic.css",
|
|
53
|
+
"@fontsource/open-sans/700.css",
|
|
54
|
+
"@fontsource/open-sans/700-italic.css"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Using SICK CDN for Open Sans
|
|
65
|
+
|
|
66
|
+
```css
|
|
67
|
+
/* Regular */
|
|
68
|
+
@font-face {
|
|
69
|
+
font-display: swap;
|
|
70
|
+
font-family: "Open Sans";
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
src:
|
|
74
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.woff2")
|
|
75
|
+
format("woff2"),
|
|
76
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.woff")
|
|
77
|
+
format("woff"),
|
|
78
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.ttf")
|
|
79
|
+
format("truetype");
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Semi Bold */
|
|
83
|
+
@font-face {
|
|
84
|
+
font-display: swap;
|
|
85
|
+
font-family: "Open Sans";
|
|
86
|
+
font-style: normal;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
src:
|
|
89
|
+
url("https://www.sick.com/media/fonts/opensans-v1/SemiBold/OpenSans-SemiBold.woff2")
|
|
90
|
+
format("woff2"),
|
|
91
|
+
url("https://www.sick.com/media/fonts/opensans-v1/SemiBold/OpenSans-SemiBold.woff")
|
|
92
|
+
format("woff"),
|
|
93
|
+
url("https://www.sick.com/media/fonts/opensans-v1/SemiBold/OpenSans-SemiBold.ttf")
|
|
94
|
+
format("truetype");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Bold */
|
|
98
|
+
@font-face {
|
|
99
|
+
font-display: swap;
|
|
100
|
+
font-family: "Open Sans";
|
|
101
|
+
font-style: normal;
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
src:
|
|
104
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.woff2")
|
|
105
|
+
format("woff2"),
|
|
106
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.woff")
|
|
107
|
+
format("woff"),
|
|
108
|
+
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.ttf")
|
|
109
|
+
format("truetype");
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
For better performance, add this preload to your HTML:
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<link
|
|
117
|
+
rel="preload"
|
|
118
|
+
href="https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.woff2"
|
|
119
|
+
as="font"
|
|
120
|
+
type="font/woff2"
|
|
121
|
+
crossorigin
|
|
122
|
+
/>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Manual Installation
|
|
22
126
|
|
|
23
127
|
1. Download the `Open Sans` font from the [SICK Brand Portal](https://brand.sick.com/document/49#/-/resources-1).
|
|
24
128
|
2. Extract the ZIP file to a destination reachable by your project (e.g. a `public` folder).
|
|
25
|
-
3. Include the font in your project by adding the following CSS
|
|
129
|
+
3. Include the font in your project by adding the following CSS (where `PUBLIC_PATH` is the path to the folder containing the font files):
|
|
26
130
|
|
|
27
131
|
```css
|
|
28
132
|
@font-face {
|
|
@@ -75,56 +179,34 @@ The following information may be helpful to get you started including your own c
|
|
|
75
179
|
}
|
|
76
180
|
```
|
|
77
181
|
|
|
78
|
-
|
|
182
|
+
---
|
|
79
183
|
|
|
80
|
-
|
|
81
|
-
2. Extract the ZIP file to a destination reachable by your project (e.g. a `public` folder).
|
|
82
|
-
3. Include the font in your project by adding the following CSS to your project (where `PUBLIC_PATH` is the path to the folder containing the font files).
|
|
184
|
+
## SICK 2025 Theme (SICK Intl)
|
|
83
185
|
|
|
84
|
-
|
|
85
|
-
@font-face {
|
|
86
|
-
font-display: swap;
|
|
87
|
-
font-family: "SICK Intl";
|
|
88
|
-
font-style: normal;
|
|
89
|
-
font-weight: 400;
|
|
90
|
-
src: url("/PUBLIC_PATH/SICKIntl/SICKIntl-Regular.ttf") format("truetype");
|
|
91
|
-
}
|
|
186
|
+
### Using @synergy-design-system/fonts (Recommended)
|
|
92
187
|
|
|
93
|
-
|
|
94
|
-
font-display: swap;
|
|
95
|
-
font-family: "SICK Intl";
|
|
96
|
-
font-style: normal;
|
|
97
|
-
font-weight: 600;
|
|
98
|
-
src: url("/PUBLIC_PATH/SICKIntl/SICKIntl-Semibold.ttf") format("truetype");
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Installing via local npm package (e.g. for vite or webpack based setups)
|
|
188
|
+
Install the fonts package:
|
|
103
189
|
|
|
104
|
-
|
|
190
|
+
```bash
|
|
191
|
+
npm install @synergy-design-system/fonts
|
|
192
|
+
```
|
|
105
193
|
|
|
106
|
-
|
|
107
|
-
2. Include the font in your project by adding the following import statements to your project:
|
|
194
|
+
#### Vite/Webpack
|
|
108
195
|
|
|
109
|
-
```
|
|
110
|
-
import "@
|
|
111
|
-
import "@fontsource/open-sans/400-italic.css";
|
|
112
|
-
import "@fontsource/open-sans/600.css";
|
|
113
|
-
import "@fontsource/open-sans/600-italic.css";
|
|
114
|
-
import "@fontsource/open-sans/700.css";
|
|
115
|
-
import "@fontsource/open-sans/700-italic.css";
|
|
196
|
+
```javascript
|
|
197
|
+
import "@synergy-design-system/fonts";
|
|
116
198
|
```
|
|
117
199
|
|
|
118
|
-
####
|
|
119
|
-
|
|
120
|
-
There is no way to install the `SICK Intl` typeface via a npm package as it is not available.
|
|
200
|
+
#### Angular
|
|
121
201
|
|
|
122
|
-
|
|
202
|
+
Import in your main styles file:
|
|
123
203
|
|
|
124
|
-
|
|
204
|
+
```css
|
|
205
|
+
/* styles.css */
|
|
206
|
+
@import "@synergy-design-system/fonts";
|
|
207
|
+
```
|
|
125
208
|
|
|
126
|
-
|
|
127
|
-
2. Adjust your `angular.json` file to include the needed stylesheets (where project_name is the name of your project):
|
|
209
|
+
Or add to your `angular.json` file:
|
|
128
210
|
|
|
129
211
|
```json
|
|
130
212
|
{
|
|
@@ -133,14 +215,7 @@ There is no way to install the `SICK Intl` typeface via a npm package as it is n
|
|
|
133
215
|
"architect": {
|
|
134
216
|
"build": {
|
|
135
217
|
"options": {
|
|
136
|
-
"styles": [
|
|
137
|
-
"@fontsource/open-sans/400.css",
|
|
138
|
-
"@fontsource/open-sans/400-italic.css",
|
|
139
|
-
"@fontsource/open-sans/600.css",
|
|
140
|
-
"@fontsource/open-sans/600-italic.css",
|
|
141
|
-
"@fontsource/open-sans/700.css",
|
|
142
|
-
"@fontsource/open-sans/700-italic.css"
|
|
143
|
-
]
|
|
218
|
+
"styles": ["@synergy-design-system/fonts/src/sick-intl/font.css"]
|
|
144
219
|
}
|
|
145
220
|
}
|
|
146
221
|
}
|
|
@@ -149,114 +224,96 @@ There is no way to install the `SICK Intl` typeface via a npm package as it is n
|
|
|
149
224
|
}
|
|
150
225
|
```
|
|
151
226
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
There is no way to install the `SICK Intl` typeface via a npm package as it is not available.
|
|
155
|
-
|
|
156
|
-
### Using the SICK CDN
|
|
157
|
-
|
|
158
|
-
This is the simplest default font behavior. The typefaces are loaded from the SICK CDN.
|
|
159
|
-
|
|
160
|
-
#### SICK 2018
|
|
227
|
+
### Using SICK CDN
|
|
161
228
|
|
|
162
229
|
```css
|
|
163
230
|
/* Regular */
|
|
164
231
|
@font-face {
|
|
165
232
|
font-display: swap;
|
|
166
|
-
font-family: "
|
|
233
|
+
font-family: "SICK Intl";
|
|
167
234
|
font-style: normal;
|
|
168
235
|
font-weight: 400;
|
|
169
|
-
src:
|
|
170
|
-
|
|
171
|
-
format("woff2"),
|
|
172
|
-
url("https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.woff")
|
|
173
|
-
format("woff"),
|
|
174
|
-
url("https://www.sick.com/media/fonts/opensans-v1/Regular/OpenSans-Regular.ttf")
|
|
175
|
-
format("truetype");
|
|
236
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2")
|
|
237
|
+
format("woff2");
|
|
176
238
|
}
|
|
177
239
|
|
|
178
240
|
/* Semi Bold */
|
|
179
241
|
@font-face {
|
|
180
242
|
font-display: swap;
|
|
181
|
-
font-family: "
|
|
243
|
+
font-family: "SICK Intl";
|
|
182
244
|
font-style: normal;
|
|
183
245
|
font-weight: 600;
|
|
184
|
-
src:
|
|
185
|
-
|
|
186
|
-
format("woff2"),
|
|
187
|
-
url("https://www.sick.com/media/fonts/opensans-v1/SemiBold/OpenSans-SemiBold.woff")
|
|
188
|
-
format("woff"),
|
|
189
|
-
url("https://www.sick.com/media/fonts/opensans-v1/SemiBold/OpenSans-SemiBold.ttf")
|
|
190
|
-
format("truetype");
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/* Bold */
|
|
194
|
-
@font-face {
|
|
195
|
-
font-display: swap;
|
|
196
|
-
font-family: "Open Sans";
|
|
197
|
-
font-style: normal;
|
|
198
|
-
font-weight: 700;
|
|
199
|
-
src:
|
|
200
|
-
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.woff2")
|
|
201
|
-
format("woff2"),
|
|
202
|
-
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.woff")
|
|
203
|
-
format("woff"),
|
|
204
|
-
url("https://www.sick.com/media/fonts/opensans-v1/Bold/OpenSans-Bold.ttf")
|
|
205
|
-
format("truetype");
|
|
246
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2")
|
|
247
|
+
format("woff2");
|
|
206
248
|
}
|
|
207
249
|
```
|
|
208
250
|
|
|
209
|
-
For better performance,
|
|
251
|
+
For better performance, add this preload to your HTML:
|
|
210
252
|
|
|
211
253
|
```html
|
|
212
254
|
<link
|
|
213
255
|
rel="preload"
|
|
214
|
-
href="https://www.sick.com/media/fonts/
|
|
256
|
+
href="https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2"
|
|
257
|
+
as="font"
|
|
258
|
+
type="font/woff2"
|
|
259
|
+
crossorigin
|
|
260
|
+
/>
|
|
261
|
+
<link
|
|
262
|
+
rel="preload"
|
|
263
|
+
href="https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2"
|
|
215
264
|
as="font"
|
|
216
265
|
type="font/woff2"
|
|
217
266
|
crossorigin
|
|
218
267
|
/>
|
|
219
268
|
```
|
|
220
269
|
|
|
221
|
-
|
|
270
|
+
### Manual Installation
|
|
271
|
+
|
|
272
|
+
1. Install `@synergy-design-system/fonts`.
|
|
273
|
+
2. Copy the font from `node_modules/@synergy-design-system/fonts/src/sick-intl` to a destination reachable by your project (e.g. a public folder).
|
|
274
|
+
3. Include the font with custom CSS (where `PUBLIC_PATH` is the path to the folder containing the font files):
|
|
222
275
|
|
|
223
276
|
```css
|
|
224
|
-
/* Regular */
|
|
225
277
|
@font-face {
|
|
226
278
|
font-display: swap;
|
|
227
|
-
font-family: "
|
|
279
|
+
font-family: "SICK Intl";
|
|
228
280
|
font-style: normal;
|
|
229
281
|
font-weight: 400;
|
|
230
|
-
src:
|
|
231
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/regular/SICKIntl-Regular.woff2")
|
|
232
|
-
format("woff2"),
|
|
233
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/regular/SICKIntl-Regular.ttf")
|
|
234
|
-
format("truetype");
|
|
282
|
+
src: url("/PUBLIC_PATH/sick-intl/SICKIntl-Regular.woff2") format("woff2");
|
|
235
283
|
}
|
|
236
284
|
|
|
237
|
-
/* Semi Bold */
|
|
238
285
|
@font-face {
|
|
239
286
|
font-display: swap;
|
|
240
|
-
font-family: "
|
|
287
|
+
font-family: "SICK Intl";
|
|
241
288
|
font-style: normal;
|
|
242
289
|
font-weight: 600;
|
|
243
|
-
src:
|
|
244
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/semibold/SICKIntl-Semibold.woff2")
|
|
245
|
-
format("woff2"),
|
|
246
|
-
format("woff"),
|
|
247
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/semibold/SICKIntl-Semibold.ttf")
|
|
248
|
-
format("truetype");
|
|
290
|
+
src: url("/PUBLIC_PATH/sick-intl/SICKIntl-Semibold.woff2") format("woff2");
|
|
249
291
|
}
|
|
250
292
|
```
|
|
251
293
|
|
|
252
|
-
|
|
294
|
+
### Manual Installation (Angular)
|
|
253
295
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
296
|
+
1. Install the `@synergy-design-system/fonts` package.
|
|
297
|
+
2. Configure your `angular.json` file to include the fonts:
|
|
298
|
+
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"projects": {
|
|
302
|
+
"project_name": {
|
|
303
|
+
"architect": {
|
|
304
|
+
"build": {
|
|
305
|
+
"options": {
|
|
306
|
+
"assets": [
|
|
307
|
+
{
|
|
308
|
+
"glob": "**/*",
|
|
309
|
+
"input": "./node_modules/@synergy-design-system/fonts/src/sick-intl",
|
|
310
|
+
"output": "/assets/fonts"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
262
319
|
```
|