폰트를 한글과 영어,숫자 따로 적용하기 (feat. unicode-range)
2022. 5. 4. 11:19ㆍStudy/Publishing
유니코드 범위
- 영문 (대문자) : U+0041-005A
- 영문 (소문자) : U+0061-007A
- 숫자 : U+0030-0039
- 한글 : U+AC00-U+D7A3
- 특수문자 : U+0020-002F, U+003A-0040, U+005B-0060, U+007B-007E
- 전체 : U+0020-007E
@font-face
body {font-family:'Roboto' ,'Noto Sans KR', 'sans-serif';}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('※'),
url('../fonts/Roboto-Regular.eot'),
url('../fonts/Roboto-Regular.eot#iefix') format('embedded-opentype')
url('../fonts/Roboto-Regular.woff') format('woff'),
url('../fonts/Roboto-Regular.otf') format('opentype'),
url('../fonts/Roboto-Regular.ttf') format('truetype');
unicode-range:U+0041-005A, U+0061-007A, U+0030-0039;
}
@font-face {
font-family: 'ChosunCentennial';
src: url(../fonts/ChosunCentennial/ChosunCentennial.eot);
src: url(../fonts/ChosunCentennial/ChosunCentennial.eot?#iefix) format('embedded-opentype'),
url(../fonts/ChosunCentennial/ChosunCentennial.woff) format('woff'),
url(../fonts/ChosunCentennial/ChosunCentennial.ttf) format('truetype');
unicode-range: U+AC00-D7A3;
}
@font-face {
font-family: 'OpenSans';
src: url(../fonts/OpenSans/OpenSans-Regular.eot);
src: url(../fonts/OpenSans/OpenSans-Regular.eot?#iefix) format('embedded-opentype'),
url(../fonts/OpenSans/OpenSans-Regular.woff) format('woff'),
url(../fonts/OpenSans/OpenSans-Regular.ttf) format('truetype');
unicode-range: U+26;
}
body {
font-size: 35px;
font-family: 'ChosunCentennial', 'OpenSans';
}
* {
font-family: inherit;
}
참고:)
https://youngkeol.tistory.com/92
https://jineecode.tistory.com/104
'Study > Publishing' 카테고리의 다른 글
input type number를 비밀번호로 표시하기, 모바일 숫자키패드 (0) | 2022.08.17 |
---|---|
CSS 방법론 - BEM (0) | 2022.05.09 |
HTML include (0) | 2022.05.03 |
input 태그의 pattern 속성과 정규표현식 (0) | 2022.05.02 |
세로쓰기 모드 writing-mode, 글자 타이핑 효과 (0) | 2022.03.18 |