728x90
반응형
리눅스에서 새로운 글꼴(Font)을 추가하는 방법
1. 글꼴 파일 다운로드
추가할 글꼴 파일을 다운로드합니다. 대부분의 글꼴 파일은 .ttf(TrueType Font) 또는 .otf(OpenType Font) 확장자를 사용합니다.
2. 글꼴 파일 복사
글꼴 파일을 /usr/share/fonts 디렉토리 또는 해당 글꼴 유형에 맞는 디렉토리에 복사합니다.
예를 들어, TrueType 글꼴의 경우 /usr/share/fonts/truetype 디렉토리에 복사합니다. OpenType 글꼴의 경우 /usr/share/fonts/opentype 디렉토리에 복사합니다.
복사할 때 파일 권한을 변경할 필요가 있을 수 있습니다. 다음 명령을 사용하여 파일 권한을 변경할 수 있습니다.
sudo chmod 644 fontfile.ttf
3. 새로운 글꼴 캐시 업데이트
새로 추가한 글꼴이 시스템에서 인식될 수 있도록 캐시를 업데이트해야 합니다.
sudo fc-cache -fv
4. 글꼴 설치 확인
글꼴이 올바르게 설치되었는지 확인하기 위해 fc-list 명령어를 사용하여 시스템에 설치된 글꼴 목록을 검색할 수 있습니다
fc-list
또는
fc-list | grep "FontName"
설치된 글꼴 리스트 중에서 새로 추가한 글꼴이 있는지 확인할 수 있습니다.
이제 리눅스에 새로운 글꼴을 추가할 수 있습니다.
font 파일 저정
$ pwd
/usr/share/fonts
$ ls
DroidSansFallback.ttf
적용
- /usr/share/fonts: caching, new cache contents: 1 fonts, 1 dirs
$ fc-cache -fv
/usr/share/fonts: caching, new cache contents: 1 fonts, 1 dirs
/usr/share/fonts/un-core: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/X11/fonts/Type1: skipping, no such directory
/usr/share/X11/fonts/TTF: skipping, no such directory
/usr/local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
폰트 확인
- Droid Sans Fallback:style=Regular
$ fc-list
Droid Sans Fallback:style=Regular
은 돋움,UnDotum:style=Regular
은 궁서,UnGungseo:style=Regular
은 그래픽,UnGraphic:style=Bold
은 바탕,UnBatang:style=Bold
은 디나루,UnDinaru:style=Bold,Light
은 필기,UnPilgi:style=Regular
은 디나루,UnDinaru:style=Regular
은 필기,UnPilgi:style=Bold
은 돋움,UnDotum:style=Bold
은 바탕,UnBatang:style=Regular
은 그래픽,UnGraphic:style=Regular
은 디나루,UnDinaru:style=Bold
yum install -y xorg-x11-font-utils ttmkfdir
mkfontscale
ttmkfdir
반응형
'리눅스' 카테고리의 다른 글
| 오라클 클라이언트를 설치하는 방법 (0) | 2014.12.18 |
|---|---|
| [리눅스] UMASK 변경 쉘 (0) | 2014.11.24 |
| CentOS 7에서 SNMPv3을 설정하는 방법 (2) | 2014.11.05 |
| SSH 키 생성과 설정을 통해 SSH 자동 로그인을 구현 (0) | 2014.11.04 |
| GlusterFS를 구축하는 방법 (0) | 2014.11.03 |