[데스크탑] 리눅스에서 윈도우 폰트 사용하기

레드햇8.0 에서 윈도우 폰트를 사용해 보자!!!!

% 모든 작업은 root 권한으로 작업한다고 가정합니다.

1. 윈도우 굴림, 바탕 폰트를 확인

c:\\windows\\fonts\\gulim.ttc

c:\\windows\\fonts\\batang.ttc

2. 폰트를 넣어둘 디렉토리를 생성하고, 윈도우 폰트를 복사해 넣는다.

mkdir /usr/share/fonts/ms-gulim

mkdir /usr/share/fonts/ms-batang

(현재 디렉토리는 마운트된 윈도우 폰트 디렉토리라고 가정)

cp gulim.ttc /usr/share/fonts/ms-gulim

cp batang.ttc /usr/share/fonts/ms-batang

3. /etc/X11/XF86Config 파일을 편집

아래 두 줄을 FontPath 부분에 추가해 준다.

FontPath “/usr/share/fonts/ms-gulim”

FontPath “/usr/share/fonts/ms-batang”

같은 파일의 Section “Module” 을 확인하고

Loat “xtt”

가 없으면 추가해 준다.

Load “freetype”

이 있을 경우 주석처리 한다.

4. /etc/X11/fs/config 파일을 편집

catalogue 부분에

/usr/share/fonts/ms-gulim,

/usr/share/fonts/ms-batang

(쉼표에 주의!!)

을 추가하고,

/usr/share/fonts/ko/TrueType

부분을 주석처리한다.

5. /etc/fonts/fonts.conf 에 위 글꼴의 디렉토리를 추가한다.

/usr/share/fonts/ms-gulim

/usr/share/fonts/ms-batang

6. xfs 데몬을 재시작하고, fc-cache 명령을 실행한다.

x윈도우 상에서 작업을 진행했다면 우선 로그아웃하여 빠져 나온 후,

/etc/init.d/xfs restart

/usr/bin/fc-cache

를 실행한다.

-* 여기서 부터 순서가 매우 중요합니다. *-

xfs 를 재시작 시키면 /usr/share/fonts/ms-gulim 등의 디렉토리 내에

fonts.dir 파일과 fonts.cache* 파일이 자동으로 생성되어지는데,

이 두 파일을 삭제하고 아래의 스크립트로 각각 글꼴에 대한 fonts.dir 파일을

만들어 넣어줘야 합니다.

7. /usr/share/fonts/ms-gulim 디렉토리 내의 fonts.dir, fonts.cache* 파일을 삭제한다.

rm -f /usr/share/fonts/ms-gulim/fonts.dir

rm -f /usr/share/fonts/ms-gulim/fonts.cache* (본인은 fonts.cache-1 파일이었음)

8. 하단 스크립트로 부터 gulim, batang 폰트에 대한 각각의 fonts.dir 파일을 생성한다.

# gulim 폰트에 대한 fonts.dir 스크립트

64

vl=y:eb=y:fn=0:gulim.ttc -ms-Gulim-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:gulim.ttc -ms-Gulim-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:gulim.ttc -ms-Gulim-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ab=y:gulim.ttc -ms-Gulim-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:ab=y:gulim.ttc -ms-Gulim-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:ab=y:gulim.ttc -ms-Gulim-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:gulim.ttc -ms-Gulim-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:gulim.ttc -ms-Gulim-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:gulim.ttc -ms-Gulim-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ab=y:gulim.ttc -ms-Gulim-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:ab=y:gulim.ttc -ms-Gulim-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:ab=y:gulim.ttc -ms-Gulim-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=0:gulim.ttc -ms-Gulim-medium-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ai=0.5:gulim.ttc -ms-Gulim-medium-i-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ab=y:gulim.ttc -ms-Gulim-bold-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ai=0.5:ab=y:gulim.ttc -ms-Gulim-bold-i-normal–0-0-0-0-p-0-iso8859-1

vl=y:eb=y:fn=1:gulim.ttc -ms-GulimChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:gulim.ttc -ms-GulimChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:gulim.ttc -ms-GulimChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ab=y:gulim.ttc -ms-GulimChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:ab=y:gulim.ttc -ms-GulimChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:ab=y:gulim.ttc -ms-GulimChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:gulim.ttc -ms-GulimChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:gulim.ttc -ms-GulimChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:gulim.ttc -ms-GulimChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ab=y:gulim.ttc -ms-GulimChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:ab=y:gulim.ttc -ms-GulimChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:ab=y:gulim.ttc -ms-GulimChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=1:gulim.ttc -ms-GulimChe-medium-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ai=0.5:gulim.ttc -ms-GulimChe-medium-i-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ab=y:gulim.ttc -ms-GulimChe-bold-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ai=0.5:ab=y:gulim.ttc -ms-GulimChe-bold-i-normal–0-0-0-0-m-0-iso8859-1

vl=y:eb=y:fn=2:gulim.ttc -ms-Dotum-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:gulim.ttc -ms-Dotum-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:gulim.ttc -ms-Dotum-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ab=y:gulim.ttc -ms-Dotum-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:ab=y:gulim.ttc -ms-Dotum-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:ab=y:gulim.ttc -ms-Dotum-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:gulim.ttc -ms-Dotum-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:gulim.ttc -ms-Dotum-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:gulim.ttc -ms-Dotum-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ab=y:gulim.ttc -ms-Dotum-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:ab=y:gulim.ttc -ms-Dotum-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:ab=y:gulim.ttc -ms-Dotum-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=2:gulim.ttc -ms-Dotum-medium-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ai=0.5:gulim.ttc -ms-Dotum-medium-i-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ab=y:gulim.ttc -ms-Dotum-bold-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ai=0.5:ab=y:gulim.ttc -ms-Dotum-bold-i-normal–0-0-0-0-p-0-iso8859-1

vl=y:eb=y:fn=3:gulim.ttc -ms-DotumChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:gulim.ttc -ms-DotumChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:gulim.ttc -ms-DotumChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ab=y:gulim.ttc -ms-DotumChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:ab=y:gulim.ttc -ms-DotumChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:ab=y:gulim.ttc -ms-DotumChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:gulim.ttc -ms-DotumChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:gulim.ttc -ms-DotumChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:gulim.ttc -ms-DotumChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ab=y:gulim.ttc -ms-DotumChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:ab=y:gulim.ttc -ms-DotumChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:ab=y:gulim.ttc -ms-DotumChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=3:gulim.ttc -ms-DotumChe-medium-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ai=0.5:gulim.ttc -ms-DotumChe-medium-i-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ab=y:gulim.ttc -ms-DotumChe-bold-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ai=0.5:ab=y:gulim.ttc -ms-DotumChe-bold-i-normal–0-0-0-0-m-0-iso8859-1

#—- 여기까지 ——————#

#– batang 폰트에 대한 fonts.dir 스크립트 —-#

64

vl=y:eb=y:fn=0:batang.ttc -ms-Batang-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:batang.ttc -ms-Batang-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:batang.ttc -ms-Batang-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ab=y:batang.ttc -ms-Batang-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:ab=y:batang.ttc -ms-Batang-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:ai=0.5:ab=y:batang.ttc -ms-Batang-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=0:batang.ttc -ms-Batang-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:batang.ttc -ms-Batang-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:batang.ttc -ms-Batang-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ab=y:batang.ttc -ms-Batang-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:ab=y:batang.ttc -ms-Batang-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=0:ai=0.5:ab=y:batang.ttc -ms-Batang-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=0:batang.ttc -ms-Batang-medium-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ai=0.5:batang.ttc -ms-Batang-medium-i-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ab=y:batang.ttc -ms-Batang-bold-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=0:ai=0.5:ab=y:batang.ttc -ms-Batang-bold-i-normal–0-0-0-0-p-0-iso8859-1

vl=y:eb=y:fn=1:batang.ttc -ms-BatangChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:batang.ttc -ms-BatangChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:batang.ttc -ms-BatangChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ab=y:batang.ttc -ms-BatangChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:ab=y:batang.ttc -ms-BatangChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:ai=0.5:ab=y:batang.ttc -ms-BatangChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=1:batang.ttc -ms-BatangChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:batang.ttc -ms-BatangChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:batang.ttc -ms-BatangChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ab=y:batang.ttc -ms-BatangChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:ab=y:batang.ttc -ms-BatangChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=1:ai=0.5:ab=y:batang.ttc -ms-BatangChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=1:batang.ttc -ms-BatangChe-medium-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ai=0.5:batang.ttc -ms-BatangChe-medium-i-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ab=y:batang.ttc -ms-BatangChe-bold-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=1:ai=0.5:ab=y:batang.ttc -ms-BatangChe-bold-i-normal–0-0-0-0-m-0-iso8859-1

vl=y:eb=y:fn=2:batang.ttc -ms-Gungseo-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:batang.ttc -ms-Gungseo-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:batang.ttc -ms-Gungseo-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ab=y:batang.ttc -ms-Gungseo-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:ab=y:batang.ttc -ms-Gungseo-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:ai=0.5:ab=y:batang.ttc -ms-Gungseo-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=2:batang.ttc -ms-Gungseo-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:batang.ttc -ms-Gungseo-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:batang.ttc -ms-Gungseo-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ab=y:batang.ttc -ms-Gungseo-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:ab=y:batang.ttc -ms-Gungseo-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=2:ai=0.5:ab=y:batang.ttc -ms-Gungseo-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=2:batang.ttc -ms-Gungseo-medium-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ai=0.5:batang.ttc -ms-Gungseo-medium-i-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ab=y:batang.ttc -ms-Gungseo-bold-r-normal–0-0-0-0-p-0-iso8859-1

eb=y:fn=2:ai=0.5:ab=y:batang.ttc -ms-Gungseo-bold-i-normal–0-0-0-0-p-0-iso8859-1

vl=y:eb=y:fn=3:batang.ttc -ms-GungseoChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:batang.ttc -ms-GungseoChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:batang.ttc -ms-GungseoChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ab=y:batang.ttc -ms-GungseoChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:ab=y:batang.ttc -ms-GungseoChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:ai=0.5:ab=y:batang.ttc -ms-GungseoChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-0

vl=y:eb=y:fn=3:batang.ttc -ms-GungseoChe-medium-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:batang.ttc -ms-GungseoChe-medium-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:batang.ttc -ms-GungseoChe-medium-i-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ab=y:batang.ttc -ms-GungseoChe-bold-r-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:ab=y:batang.ttc -ms-GungseoChe-bold-o-normal–0-0-0-0-c-0-ksc5601.1987-1

vl=y:eb=y:fn=3:ai=0.5:ab=y:batang.ttc -ms-GungseoChe-bold-i-normal–0-0-0-0-c-0-ksc5601.1987-1

eb=y:fn=3:batang.ttc -ms-GungseoChe-medium-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ai=0.5:batang.ttc -ms-GungseoChe-medium-i-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ab=y:batang.ttc -ms-GungseoChe-bold-r-normal–0-0-0-0-m-0-iso8859-1

eb=y:fn=3:ai=0.5:ab=y:batang.ttc -ms-GungseoChe-bold-i-normal–0-0-0-0-m-0-iso8859-1

#– 여기까지 —-#

9. 생성한 fonts.dir 파일을 각각의 폰트 디렉토리에 복사해 넣는다.

cp fonts.dir /usr/share/fonts/ms-gulim/fonts.dir (<- gulim 폰트의 fonts.dir)

cp fonts.dir /usr/share/fonts/ms-batang/fonts.dir (<- batang 폰트의 fonts.dir)

10. /etc/X11/fs/config 파일의 catalogue 부분을 편집한다.

/usr/share/fonts/ms-gulim

/usr/share/fonts/ms-batang

두 라인을 주석처리한다.

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

2 Responses

  1. 2024년 10월 5일

    … [Trackback]

    […] Find More Info here to that Topic: nblog.syszone.co.kr/archives/478 […]

  2. 2024년 11월 19일

    … [Trackback]

    […] Find More Info here to that Topic: nblog.syszone.co.kr/archives/478 […]

페이스북/트위트/구글 계정으로 댓글 가능합니다.