Linux Desktop(X-Windows)에서 MS 폰트 사용하기

  1. MS 폰트를 카피할 디렉토리를 만든다.
    starlits@wolf:/root# mkdir /usr/share/fonts/truetype/ms/
  2. MS 한글폰트를 적당히 카피한다.
    starlits@wolf:/root# cp *.ttc *.ttf *.TTF /usr/share/fonts/truetype/ms
    starlits@wolf:/root# cd /usr/share/fonts/truetype/ms
    starlits@wolf:/usr/share/fonts/truetype/ms# ls *.ttc *.ttf *.TTF
    NGULIM.TTF  batang.ttc  gulim.ttc  simsun.ttc  tahoma.ttf  tahomabd.ttf  
    verdana.ttf  verdanab.ttf  verdanai.ttf  verdanaz.ttf
  3. /etc/fonts/local.conf 파일을 만든다.
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
      <dir>/usr/share/fonts/truetype</dir>
      <dir>/usr/X11R6/lib/X11/fonts</dir>
      <dir>/data/fonts</dir>
    
        <alias>
            <family>serif</family>
            <prefer>
                <family>Times New Roman</family>
                <family>Nimbus Roman No9 L</family>
                <family>Luxi Serif</family>
                <family>Times</family>
                <family>Kochi Mincho</family>
                <family>AR PL SungtiL GB</family>
                <family>AR PL Mingti2L Big5</family>
                <family>New Gulim</family>
            </prefer>
        </alias>
        <alias>
            <family>sans-serif</family>
            <prefer>
                <family>Verdana</family>
                <family>Nimbus Sans L</family> 
                <family>Luxi Sans</family>
                <family>Arial</family>
                <family>Helvetica</family>
                <family>Kochi Gothic</family>
                <family>AR PL KaitiM GB</family>
                <family>AR PL KaitiM Big5</family>
                <family>New Gulim</family>
                <family>SimSun</family>
            </prefer>
        </alias>
        <alias>
            <family>monospace</family>
            <prefer>
                <family>Andale Mono</family>
                <family>Courier New</family>
                <family>Luxi Mono</family>
                <family>Nimbus Mono L</family>
                <family>Kochi Gothic</family> 
                <family>AR PL KaitiM GB</family>
                <family>GulimChe</family>
            </prefer>
        </alias>
    <!-- Uncomment below to enable subpixel rendering -->
    <!--
      <match target="font">
        <test qual="all" name="rgba">
          <const>unknown</const>
        </test>
        <edit name="rgba" mode="assign"><const>rgb</const></edit>
      </match>
    -->    <match target="font">
            <edit name="autohint" mode="assign"><bool>true</bool></edit>
        </match>
        <match target="font">
            <test name="family" mode="eq"><string>Gulim</string></test>
            <test name="size" compare="more"><int>8</int></test>
            <test name="size" compare="less"><int>18</int></test>
            <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>
        <match target="font">
            <test name="family" mode="eq"><string>GulimChe</string></test>
            <test name="size" compare="more"><int>8</int></test>
            <test name="size" compare="less"><int>18</int></test>
            <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>
        <match target="font">
            <test name="family" mode="eq"><string>New Gulim</string></test>
            <test name="size" compare="more"><int>8</int></test>
            <test name="size" compare="less"><int>18</int></test>
            <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>
        <match target="font">
            <test name="family" mode="eq"><string>Dotum</string></test>
            <test name="size" compare="more"><int>8</int></test>
            <test name="size" compare="less"><int>18</int></test>
            <edit name="antialias" mode="assign"><bool>false</bool></edit>
        </match>
    </fontconfig>
  4. fc-cache 명령을 이용하여, 폰트를 적용한다.
    starlits@wolf:/root# fc-cache -f
  5. 폰트 캐쉬가 생성되었는지 확인한다.
    starlits@wolf:/root# ls /usr/share/fonts/truetype/ms/fonts.chache-1