Documents

  • account_tree
  • bug_report

작성 언어 및 텍스트 유형(예: 숫자)에 따라 글꼴을 적용

font-family 속성을 통해 텍스트의 글꼴을 지정할 수 있다. 두 가지 이상의 언어를 사용하여 콘텐츠를 구성하는 경우 언어별로 적합한 글꼴을 지정해야 할 때가 있을 것이다.

글꼴 정의 방법

각각 적용할 언어 또는 텍스트 타입별로 사용할 폰트를 @font-face로 정의한다.

@font-face {
    font-family: NanumGothic;
    font-style: italic;
    font-weight: bold;
    src: local('NanumGothic'),
	    url('/webfonts/NanumGothic.eot'), /* IE 6~8 */
	    url('/webfonts/NanumGothic.woff') format('woff'),
	    url('/webfonts/NanumGothic.otf') format(‘opentype’);
}

글꼴을 적용할 유니코드 범위 지정

unicode-range 디스크립터로 적용할 범위를 지정한다. 대표적인 유니코드 범위는 다음과 같다.

  • 영문(대문자): U+0041-005A
  • 영문(소문자): U+0061-007A
  • 숫자: U+0030-0039
  • 한글: U+AC00-D7A3
@font-face {
    font-family: NanumGothic;
    font-style: italic;
    font-weight: bold;
    src: local('NanumGothic'),
	    url('/webfonts/NanumGothic.eot'), /* IE 6~8 */
	    url('/webfonts/NanumGothic.woff') format('woff'),
	    url('/webfonts/NanumGothic.otf') format(‘opentype’);
    unicode-range: U+AC00-D7A3; /* 한글 범위 */
}