Skip to content

Commit 7628954

Browse files
committed
Refactor: Pretendard 가변 폰트(Variable Font) 도입 및 리소스 최적화
1 parent 92fb6ab commit 7628954

File tree

11 files changed

+24
-11
lines changed

11 files changed

+24
-11
lines changed
Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
package com.threegap.bitnagil.designsystem.font
22

3+
import androidx.compose.ui.text.ExperimentalTextApi
34
import androidx.compose.ui.text.font.Font
45
import androidx.compose.ui.text.font.FontFamily
5-
import androidx.compose.ui.text.font.FontStyle
6+
import androidx.compose.ui.text.font.FontVariation
67
import androidx.compose.ui.text.font.FontWeight
78
import com.threegap.bitnagil.designsystem.R
89

10+
@OptIn(ExperimentalTextApi::class)
911
val pretendard = FontFamily(
10-
Font(R.font.pretendard_black, FontWeight.Black, FontStyle.Normal),
11-
Font(R.font.pretendard_extra_bold, FontWeight.ExtraBold, FontStyle.Normal),
12-
Font(R.font.pretendard_bold, FontWeight.Bold, FontStyle.Normal),
13-
Font(R.font.pretendard_semi_bold, FontWeight.SemiBold, FontStyle.Normal),
14-
Font(R.font.pretendard_medium, FontWeight.Medium, FontStyle.Normal),
15-
Font(R.font.pretendard_regular, FontWeight.Normal, FontStyle.Normal),
16-
Font(R.font.pretendard_light, FontWeight.Light, FontStyle.Normal),
17-
Font(R.font.pretendard_extra_light, FontWeight.ExtraLight, FontStyle.Normal),
18-
Font(R.font.pretendard_thin, FontWeight.Thin, FontStyle.Normal),
12+
Font(
13+
resId = R.font.pretendard_variable,
14+
weight = FontWeight.Bold,
15+
variationSettings = FontVariation.Settings(FontVariation.weight(700)),
16+
),
17+
Font(
18+
resId = R.font.pretendard_variable,
19+
weight = FontWeight.SemiBold,
20+
variationSettings = FontVariation.Settings(FontVariation.weight(600)),
21+
),
22+
Font(
23+
resId = R.font.pretendard_variable,
24+
weight = FontWeight.Medium,
25+
variationSettings = FontVariation.Settings(FontVariation.weight(500)),
26+
),
27+
Font(
28+
resId = R.font.pretendard_variable,
29+
weight = FontWeight.Normal,
30+
variationSettings = FontVariation.Settings(FontVariation.weight(400)),
31+
),
1932
)
2033

2134
val cafe24SsurroundAir = FontFamily(
22-
Font(R.font.cafe_24_ssurround_air_v1_1, FontWeight.Light, FontStyle.Normal),
35+
Font(R.font.cafe_24_ssurround_air_v1_1, FontWeight.Light),
2336
)
-1.49 MB
Binary file not shown.
-1.5 MB
Binary file not shown.
-1.5 MB
Binary file not shown.
-1.47 MB
Binary file not shown.
-1.53 MB
Binary file not shown.
-1.51 MB
Binary file not shown.
-1.5 MB
Binary file not shown.
-1.51 MB
Binary file not shown.
-1.42 MB
Binary file not shown.

0 commit comments

Comments
 (0)