메뉴 건너뛰기

Dev tips

JSP 리눅스에서 자바 한글 폰트 설정

taknim 2008.03.20 01:57 조회 수 : 8757 추천:1998

http://www.borlandforum.com/impboard/impboard.dll?action=read&db=jbuilder_qna&no=173안녕하세요 스페로 입니다...

혹시나 이방법이 될지 안될지 모르겠습니다.

저두 태스트는 안해 봣고요

제경우 한컴3.0에 제빌더 8은 한글 잘나옵니다...

하지만 이방법을 해보세요


/opt/JBuilder8/jdk1.4/jre/lib/fonts
에 보면

fonts.dir 이파일이랑 ttf (투루타입 폰트 파일들이 쭉 잇을 겁니다..)
여기에 M$에 폰트를 복사해서 그걸 이용하는 방법이죠..

batang.ttc gulim.ttc mingliu.ttc
윈도우2000 쪽에서 일단 위 폰트 파일들을 복사해서

/opt/JBuilder8/jdk1.4/jre/lib/fonts
여기에 복사합니다. (방법은 SAMBA를 이용하시던지 아니면 FTP를 통해서 리눅스쪽으로 넣습니다.)

그리고 fonts.dir파일을 수정합니다.
첫줄에 보면 72라고 되어 있는데 폰트3개를 추가하니 75로 변경하시고요

batang.ttc -ms-batang-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
gulim.ttc -ms-gulim-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
mingliu.ttc -ms-mingliu-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
맨아래에 다음을 추가 합니다.

첨부 파일을 다운로드 받으셔도 되지만.. 꼭 권한과 구릅등을 마추어 주세요...

다음은
/opt/JBuilder8/jdk1.4/jre/lib
로 이동 하셔서..

font.properties.ko 파일을 세로이 생성합니다.
아래의 내용으로 만드셔 야 됩니다. Ctrl + C 누르시고 CRT같은걸로 vi 연다음 a누르고 페이스트 하면 붙습니다.

아니면 이것도 첨부 파일 복사해서 권한과 구릅 마추세요.

참고적으로 이방법은 오라클 9i R2에 한글이 네모로 나오는 현상에 jdk한글 추가 방법입니다.

font.properties.ko 의 내용
======================================================================================
# @(#)font.properties.linux 1.7 01/04/21
#
# Copyright 1997-2001 by Sun Microsystems, Inc.,
# 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
# All rights reserved.
#
# This software is the confidential and proprietary information
# of Sun Microsystems, Inc. ("Confidential Information"). You
# shall not disclose such Confidential Information and shall use
# it only in accordance with the terms of the license agreement
# you entered into with Sun.
#

#
# Linux version derived from the version for SunOS 5.5.1 Notice that
# we use the .ttf files shipped in the JDK distribution.
#

# Serif font definition
#
serif.0=-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1
serif.1=-ms-batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

serif.italic.0=-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1
serif.italic.1=-ms-batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

serif.bold.0=-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1
serif.bold.1=-ms-batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

serif.bolditalic.0=-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1
serif.bolditalic.1=-ms-batang-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# SansSerif font definition
#
sansserif.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

sansserif.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.italic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

sansserif.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bold.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

sansserif.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
sansserif.bolditalic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# Monospaced font definition
#
monospaced.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.1=-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

monospaced.italic.0=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.italic.1=-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

monospaced.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bold.1=-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

monospaced.bolditalic.0=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
monospaced.bolditalic.1=-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# Dialog font definition
#
dialog.0=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialog.italic.0=-b&h-lucidasans-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.italic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialog.bold.0=-b&h-lucidasans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bold.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialog.bolditalic.0=-b&h-lucidasans-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1
dialog.bolditalic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# DialogInput font definition
#
dialoginput.0=-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialoginput.italic.0=-b&h-lucidatypewriter-medium-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.italic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialoginput.bold.0=-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bold.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

dialoginput.bolditalic.0=-b&h-lucidatypewriter-bold-i-normal-sans-*-%d-*-*-m-*-iso8859-1
dialoginput.bolditalic.1=-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# Default font definition
#
default.char=274f

# name aliases
#
alias.timesroman=serif
alias.helvetica=sansserif
alias.courier=monospaced

# for backward compatibility
#uncomment with urw fonts
#zapfdingbats.0=--zapf dingbats-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific

# Static FontCharset info.
#
# This information is used by the font which is not indexed by Unicode.
# Such fonts can use their own subclass of FontCharset.
#
# This information can be overriden by describing more specific style.
# For example
#
# fontcharset.serif.plain.3=SpecialSymbols
# means serif.plain.3 font''s index can be retrieved with the convert() method
# of instance of SpecialSymbols and what kind of characters serif.plain.3 font
# has can be judged with the isCovered() method of instance of SpecialSymbols.
#
fontcharset.serif.0=sun.io.CharToByteISO8859_1
fontcharset.serif.1=sun.awt.motif.CharToByteX11KSC5601

fontcharset.sansserif.0=sun.io.CharToByteISO8859_1
fontcharset.sansserif.1=sun.awt.motif.CharToByteX11KSC5601

fontcharset.monospaced.0=sun.io.CharToByteISO8859_1
fontcharset.monospaced.1=sun.awt.motif.CharToByteX11KSC5601

fontcharset.dialog.0=sun.io.CharToByteISO8859_1
fontcharset.dialog.1=sun.awt.motif.CharToByteX11KSC5601

fontcharset.dialoginput.0=sun.io.CharToByteISO8859_1
fontcharset.dialoginput.1=sun.awt.motif.CharToByteX11KSC5601

#replace font line if you have zapf fonts
#fontcharset.zapfdingbats.0=sun.io.CharToByteISO8859_1

# exclusion info.
#
# This information describe exclusion ranges for each fonts.
#
# ''exclusion.serif.plain.0'' overrides ''exclusion.serif.0'', and
# ''exclusion.serif.0'' overrides exclusion.0, and so on.
#

# XFontSet string
# X11 only properties
#

fontset.serif.plain=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidabright-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.serif.italic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidabright-medium-i-normal--*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.serif.bold=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidabright-demibold-r-normal--*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.serif.bolditalic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidabright-demibold-i-normal--*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# SansSerif font definition
#

fontset.sansserif.plain=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.sansserif.italic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.sansserif.bold=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.sansserif.bolditalic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# Monospaced font definition
#

fontset.monospaced.plain=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.monospaced.italic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.monospaced.bold=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.monospaced.bolditalic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# Dialog font definition
#

fontset.dialog.italic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-medium-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialog.bold=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialog.bolditalic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-bold-i-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialog.plain=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

# DialogInput font definition
#

fontset.dialoginput.italic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialoginput.bold=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialoginput.bolditalic=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-bold-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

fontset.dialoginput.plain=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucidatypewriter-medium-r-normal-sans-*-%d-*-*-m-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0

#uncomment with urw fonts
#fontset.zapfdingbats=\
#--zapf dingbats-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific

#
fontset.default=\
-ms-mingliu-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0,\
-b&h-lucida-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1,\
-ms-gulim-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
#