You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: custom/config-fonts.md
+25-25
Original file line number
Diff line number
Diff line change
@@ -1,59 +1,59 @@
1
-
# Configure Fonts
1
+
# Cấu hình phông chữ
2
2
3
-
While you can use HTML and CSS to customize the fonts and style for your slides as you want, Slidev also provides a convenient way to use them effortlessly.
3
+
Mặc dù bạn có thể sử dụng HTML và CSS để tùy chỉnh phông chữ và style cho các slide theo ý muốn, Slidev cũng cung cấp một cách tiện lợi để sử dụng chúng một cách dễ dàng.
4
4
5
-
In your frontmatter, configure as the following:
5
+
Trong phần frontmatter, cấu hình như sau:
6
6
7
7
```yaml
8
8
---
9
9
fonts:
10
-
#basically the text
10
+
#cơ bản là văn bản
11
11
sans: Robot
12
-
#use with `font-serif` css class from UnoCSS
12
+
#sử dụng với class css `font-serif` từ UnoCSS
13
13
serif: Robot Slab
14
-
#for code blocks, inline code, etc.
14
+
#cho khối code, inline code, v.v.
15
15
mono: Fira Code
16
16
---
17
17
```
18
18
19
-
And that's all.
19
+
Vậy là xong.
20
20
21
-
Fonts will be **imported automatically from [Google Fonts](https://fonts.google.com/)**. That means you can use any fonts available on Google Fonts directly.
21
+
Phông chữ sẽ được **tự động import từ [Google Fonts](https://fonts.google.com/)**. Điều này có nghĩa là bạn có thể sử dụng bất kỳ phông chữ nào có sẵn trên Google Fonts trực tiếp.
22
22
23
-
## Local Fonts
23
+
## Phông chữ cục bộ
24
24
25
-
By default, Slidev assumes all the fonts specified via `fonts`configurations come from Google Fonts. If you want to use local fonts, specify the `fonts.local`to opt-out the auto-importing.
25
+
Theo mặc định, Slidev giả định tất cả các phông chữ được chỉ định thông qua cấu hình `fonts`đến từ Google Fonts. Nếu bạn muốn sử dụng phông chữ cục bộ, hãy chỉ định `fonts.local`để không tự động import phông chữ.
26
26
27
27
```yaml
28
28
---
29
29
fonts:
30
-
#like font-family in css, you can use `,` to separate multiple fonts for fallback
30
+
#giống như font-family trong css, bạn có thể dùng `,` để phân tách nhiều phông chữ dự phòng
31
31
sans: 'Helvetica Neue,Robot'
32
-
#mark 'Helvetica Neue' as local font
32
+
#đánh dấu 'Helvetica Neue' là phông chữ cục bộ
33
33
local: Helvetica Neue
34
34
---
35
35
```
36
36
37
-
## Weights & Italic
37
+
## Độ dày & chữ nghiêng
38
38
39
-
By default, Slidev imports three weights `200`,`400`,`600`for each font. You can configure them by:
39
+
Theo mặc định, Slidev import ba độ dày (weight) `200`,`400`,`600`cho mỗi phông chữ. Bạn có thể cấu hình chúng như sau:
40
40
41
41
```yaml
42
42
---
43
43
fonts:
44
44
sans: Robot
45
-
#default
45
+
#mặc định
46
46
weights: '200,400,600'
47
-
# import italic fonts, default `false`
47
+
# import phông chữ nghiêng, mặc định là `false`
48
48
italic: false
49
49
---
50
50
```
51
51
52
-
This configuration applies to all web fonts. For more fine-grained controls of each font's weights, you will need to manually import them with [HTML](/custom/directory-structure.html#index-html)and CSS.
52
+
Cấu hình này áp dụng cho tất cả phông chữ web. Để kiểm soát chi tiết hơn độ dày của từng phông chữ, bạn cần nhập thủ công bằng [HTML](/custom/directory-structure.html#index-html)và CSS.
53
53
54
-
## Fallback Fonts
54
+
## Phông chữ dự phòng
55
55
56
-
For most of the scenarios, you only need to specify the "special font" and Slidev will append the fallback fonts for you, for example:
56
+
Trong hầu hết các trường hợp, bạn chỉ cần chỉ định "phông chữ đặc biệt" và Slidev sẽ thêm các phông chữ dự phòng cho bạn, ví dụ:
57
57
58
58
```yaml
59
59
---
@@ -64,7 +64,7 @@ fonts:
64
64
---
65
65
```
66
66
67
-
will result in
67
+
sẽ cho kết quả:
68
68
69
69
<!-- eslint-skip -->
70
70
@@ -80,7 +80,7 @@ will result in
80
80
}
81
81
```
82
82
83
-
If you want to disable the fallback fonts, configure as the following:
83
+
Nếu bạn muốn disable phông chữ dự phòng, hãy cấu hình như sau:
84
84
85
85
```yaml
86
86
---
@@ -90,12 +90,12 @@ fonts:
90
90
---
91
91
```
92
92
93
-
## Providers
93
+
## Nhà cung cấp
94
94
95
-
-Options: `google` | `none`
96
-
-Default: `google`
95
+
-Các option: `google` | `none`
96
+
-Mặc định: `google`
97
97
98
-
Currently, only Google Fonts is supported, we are planning to add more providers in the future. Specify to`none`will disable the auto-importing feature entirely and treat all the fonts locally.
98
+
Hiện tại, chỉ có Google Fonts được hỗ trợ, chúng tôi đang có kế hoạch bổ sung thêm nhiều nhà cung cấp trong tương lai. Chỉ định`none`sẽ disable hoàn toàn tính năng tự động import và coi tất cả các phông chữ là cục bộ.
0 commit comments