Android:Font
안드로이드에서 기본적으로 제공되는 폰트는 아래와 같다. XML Layout에서 android:typeface
속성을 사용하여 바로 설정할 수 있다.
List of Typeface
폰트명 | 속성값 |
sans || android:typeface="sans" | |
serif || android:typeface="serif" | |
monospace || android:typeface="monospace" |
Code에서 별도의 폰트파일을 적용하는 방법
안드로이드에서 특정 텍스트의 폰트를 변경하고 싶을 경우 TypeFace 클래스를 사용하면 된다. 폰트파일이 assets/fonts/msgothic.ttc
에 존재할 경우 아래와 같이 적용할 수 있다.