Skip to content

Commit 783e272

Browse files
committed
Webkit Support
1 parent 052a19b commit 783e272

File tree

3 files changed

+76
-6
lines changed

3 files changed

+76
-6
lines changed

src/Pages/AboutusPage/style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled, { keyframes, css } from "styled-components";
2-
import { bodyText } from "../../Styles/commonStyles";
2+
import { bodyText, lightText } from "../../Styles/commonStyles";
33
import AboutusTitleJpg from "../../Assets/images/jpg/aboutus-title.jpg";
44

55
const fadeIn = keyframes`
@@ -135,7 +135,7 @@ export const GreetingTitle = styled.div`
135135
`;
136136

137137
export const GreetingDesc = styled.div`
138-
${bodyText}
138+
${lightText}
139139
font-size: 18px;
140140
color: #171717;
141141
line-height: 1.6;

src/Styles/GlobalStyle.jsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,36 @@ const GlobalStyle = createGlobalStyle`
8181
url('../../public/fonts/woff2/Pretendard-Thin.woff2') format('woff2'),
8282
url('../../public/fonts/woff/Pretendard-Thin.woff') format('woff');
8383
}
84+
85+
@font-face {
86+
font-family: 'Pretendard';
87+
font-weight: 200;
88+
font-display: swap;
89+
src: local('Pretendard ExtraLight'),
90+
url('../../public/fonts/woff2/Pretendard-ExtraLight.woff2') format('woff2'),
91+
url('../../public/fonts/woff/Pretendard-ExtraLight.woff') format('woff');
92+
}
93+
94+
@font-face {
95+
font-family: 'Pretendard';
96+
font-weight: 300;
97+
font-display: swap;
98+
src: local('Pretendard Light'),
99+
url('../../public/fonts/woff2/Pretendard-Light.woff2') format('woff2'),
100+
url('../../public/fonts/woff/Pretendard-Light.woff') format('woff');
101+
}
102+
103+
/* iOS Safari에서 더 가벼운 기본 폰트 사용 */
104+
@supports (-webkit-appearance: none) {
105+
@font-face {
106+
font-family: 'PretendardLight';
107+
font-weight: normal;
108+
font-display: swap;
109+
src: local('Pretendard Light'),
110+
url('../../public/fonts/woff2/Pretendard-Light.woff2') format('woff2'),
111+
url('../../public/fonts/woff/Pretendard-Light.woff') format('woff');
112+
}
113+
}
84114
* {
85115
padding: 0;
86116
margin: 0;
@@ -90,6 +120,7 @@ const GlobalStyle = createGlobalStyle`
90120
-webkit-font-smoothing: antialiased;
91121
-moz-osx-font-smoothing: grayscale;
92122
font-synthesis: none;
123+
text-rendering: optimizeLegibility;
93124
}
94125
95126
/* iOS에서의 폰트 렌더링 최적화 */
@@ -98,6 +129,24 @@ const GlobalStyle = createGlobalStyle`
98129
-webkit-font-smoothing: subpixel-antialiased;
99130
}
100131
}
132+
133+
/* iOS Safari 전용 폰트 최적화 */
134+
@supports (-webkit-appearance: none) {
135+
* {
136+
-webkit-font-smoothing: subpixel-antialiased;
137+
-webkit-text-stroke: 0.1px transparent;
138+
font-family: 'PretendardLight', 'Pretendard', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
139+
}
140+
}
141+
142+
/* iPhone에서 Pretendard 폰트가 두껍게 보이는 문제 해결 */
143+
@media only screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
144+
* {
145+
font-family: 'PretendardLight', 'Pretendard', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
146+
-webkit-font-smoothing: subpixel-antialiased;
147+
-webkit-text-stroke: 0.05px transparent;
148+
}
149+
}
101150
`;
102151

103152
export default GlobalStyle;

src/Styles/commonStyles.js

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,24 +123,45 @@ export const sectionSubtitle = css`
123123

124124
// iOS에서 본문 텍스트를 위한 가벼운 폰트 스타일
125125
export const lightText = css`
126-
font-weight: 300;
126+
font-weight: 200;
127127
-webkit-font-smoothing: antialiased;
128128
-moz-osx-font-smoothing: grayscale;
129129
130130
/* iOS Safari에서 폰트를 더 가볍게 보이도록 */
131131
@supports (-webkit-appearance: none) {
132-
font-weight: 200;
132+
font-weight: 100;
133+
-webkit-font-smoothing: subpixel-antialiased;
134+
}
135+
136+
/* iOS 특정 미디어 쿼리 */
137+
@media screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
138+
font-weight: 100;
139+
-webkit-font-smoothing: subpixel-antialiased;
140+
text-rendering: optimizeLegibility;
133141
}
134142
`;
135143

136144
// iOS에서 일반 본문 텍스트를 위한 스타일
137145
export const bodyText = css`
138-
font-weight: 400;
146+
font-weight: 300;
139147
-webkit-font-smoothing: antialiased;
140148
-moz-osx-font-smoothing: grayscale;
149+
text-rendering: optimizeLegibility;
141150
142151
/* iOS Safari에서 폰트를 더 가볍게 보이도록 */
143152
@supports (-webkit-appearance: none) {
144-
font-weight: 300;
153+
font-weight: 200;
154+
-webkit-font-smoothing: subpixel-antialiased;
155+
}
156+
157+
/* iOS 특정 미디어 쿼리 */
158+
@media screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
159+
font-weight: 200;
160+
-webkit-font-smoothing: subpixel-antialiased;
161+
}
162+
163+
/* iPhone에서 더 가벼운 폰트 */
164+
@media only screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
165+
font-weight: 200;
145166
}
146167
`;

0 commit comments

Comments
 (0)