Skip to content

Commit 6641d8d

Browse files
committed
Update Font doc
1 parent e11b7c2 commit 6641d8d

1 file changed

Lines changed: 3 additions & 21 deletions

File tree

storybook/stories/guides/installation/_FONTS.mdx

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,88 +76,70 @@ Create new CSS file (e.g fonts.css), place it to your static or public directory
7676

7777
@font-face {
7878
font-family: "IBMPlexSans-ExtraLight";
79-
font-weight: 200;
8079
src: url("/fonts/IBMPlexSans-ExtraLight.woff");
8180
}
8281

8382
@font-face {
8483
font-family: "IBMPlexSans-ExtraLight-Italic";
85-
font-weight: 300;
86-
font-style: italic;
8784
src: url("/fonts/IBMPlexSans-ExtraLight-Italic.woff");
8885
}
8986

9087
@font-face {
9188
font-family: "IBMPlexSans-Light";
92-
font-weight: 300;
9389
src: url("/fonts/IBMPlexSans-Light.woff");
9490
}
9591

9692
@font-face {
9793
font-family: "IBMPlexSans-Light-Italic";
98-
font-weight: 300;
99-
font-style: italic;
10094
src: url("/fonts/IBMPlexSans-Light-Italic.woff");
10195
}
10296

10397
@font-face {
10498
font-family: "IBMPlexSans-Regular";
105-
font-weight: 400;
10699
src: url("/fonts/IBMPlexSans-Regular.woff");
107100
}
108101

109102
@font-face {
110103
font-family: "IBMPlexSans-Italic";
111-
font-weight: 400;
112-
font-style: italic;
113104
src: url("/fonts/IBMPlexSans-Italic.woff");
114105
}
115106

116107
@font-face {
117108
font-family: "IBMPlexSans-Medium";
118-
font-weight: 500;
119109
src: url("/fonts/IBMPlexSans-Medium.woff");
120110
}
121111

122112
@font-face {
123113
font-family: "IBMPlexSans-Medium-Italic";
124-
font-weight: 500;
125-
font-style: italic;
126114
src: url("/fonts/IBMPlexSans-Medium-Italic.woff");
127115
}
128116

129117
@font-face {
130118
font-family: "IBMPlexSans-SemiBold";
131-
font-weight: 600;
132119
src: url("/fonts/IBMPlexSans-SemiBold.woff");
133120
}
134121

135122
@font-face {
136123
font-family: "IBMPlexSans-SemiBold-Italic";
137-
font-weight: 600;
138-
font-style: italic;
139124
src: url("/fonts/IBMPlexSans-SemiBold-Italic.woff");
140125
}
141126

142127
@font-face {
143128
font-family: "IBMPlexSans-Bold";
144-
font-weight: 700;
145129
src: url("/fonts/IBMPlexSans-Bold.woff");
146130
}
147131

148132
@font-face {
149133
font-family: "IBMPlexSans-Bold-Italic";
150-
font-weight: 700;
151-
font-style: italic;
152134
src: url("/fonts/IBMPlexSans-Bold-Italic.woff");
153135
}
154136
```
155137

156-
> ⚠️ Please, do not modify the `font-family` value because the `<Text>` component is using the different `fontFamily` name for different weight variant
138+
> You realized the sample above is not using `font-weight` and `font-style` attribute, because the `Text` component is using the PostScript name to make it consistent on cross platforms. See [recommendation for font file naming](https://docs.expo.dev/develop/user-interface/fonts/#how-to-determine-which-font-family-name-to-use)
157139
158140
Then, we have to include the CSS in your project with two ways. Choose one of following ways
159141

160-
### External Resource Link Element
142+
### - External Resource Link Element
161143
Traditionally, you can include it to your web with the [External Resource Link Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link) or you may know it as `<link>` element in HTML
162144

163145
```html
@@ -170,7 +152,7 @@ Traditionally, you can include it to your web with the [External Resource Link E
170152
```
171153
> In [Expo](https://docs.expo.dev/workflow/web) with Expo Router, you can include the &lt;link&gt; element in your [Root HTML](https://docs.expo.dev/router/web/static-rendering/#root-html) file
172154
173-
### Import the CSS from JavaScript Entry
155+
### - Import the CSS from JavaScript Entry
174156
If your project can support importing CSS. Import the CSS globally. Likely, it's in the root layout of your React app. It should've been applied to the entire page.
175157

176158
```tsx

0 commit comments

Comments
 (0)