À¯´Ð½º¿¡¼­ Çö´ë ÇÑ±Û 11,172ÀÚ Ãâ·Â ¹æ¹ý ¹× ¿¾ ÇÑ±Û Ãâ·Â ¹æ¹ý, ±âŸ ¹®Á¦Á¡.


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :±è´öÅ 1998³â 5¿ù 04ÀÏ 18:17:42

In Reply to: JDK 1.1, 1.2ÀÇ ÇÑ±Û °ü·Ã ÀÎÄÚµù°ú ±âŸ posted by ±è´öÅ on 1998³â 4¿ù 22ÀÏ 16:13:34:

´ÙÀ½ È­ÀϵéÀ» ¼Ò½º Äڵ峻¿¡ ¼³¸íµÈ ´ë·Î ¼³Ä¡Çؼ­ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
KSC5601 ±âÈ£ ¹× ÇÑÀÚ´Â KSC5601 ÆùÆ®¸¦ »ç¿ëÇÏ°í, ÇÑ±Û À½ÀýÀº
Hanterm Á¶ÇÕ ÆùÆ®¸¦ »ç¿ëÇÏ¿© Ãâ·ÂÇÏ°Ô µË´Ï´Ù.


¼öÁ¤µÈ ³»¿ëÀº ´ÙÀ½°ú °°½À´Ï´Ù.


1. ÄÚµå º¯È¯ Ŭ·¡½ºÀÇ ¸î°¡Áö ¹ö±× ±³Á¤


2. À¯´ÏÄÚµå 2.0ÀÇ Ã¹°¡³¡ Äڵ带 »ç¿ëÇÏ¿© Çö´ë ÇÑ±Û »Ó¸¸ ¾Æ´Ï¶ó,
Hanterm Á¶ÇÕ ÆùÆ®°¡ Á¦°øÇÏ´Â ¿¾ Çѱ۵µ Ãâ·ÂÇÒ ¼ö ÀÖÀ¸¸ç,
Ãʼº, Á¾¼º, Á¾¼º, Ãʼº + Áß¼º, Ãʼº + Á¾¼º, Áß¼º + Á¾¼º,
Ãʼº + Áß¼º + Á¾¼º µîµî ´Ù¾çÇÏ°Ô Á¶ÇյǴ Çѱ۵µ
Ãâ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.


3. ÇÑ±Û »ç¿ë¿¡ º¸´Ù ÀûÀýÇϵµ·Ï "Monospaced" ÆùÆ®¸¦ ¼³Á¤ÇÏ¿©,
KSC 5601 ¹®ÀÚÀÇ ³ÐÀÌ°¡ ¾Æ½ºÅ° ¹®ÀÚÀÇ 2¹è°¡ µÇµµ·Ï ÇÔÀ¸·Î½á
ÀÚ¹Ù·Î ¸¸µé¾îÁø ÅؽºÆ® ¿¡µðÅ͵îÀ» Á¦´ë·Î »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù.


¹®Á¦Á¡.
=======


1. Á¶ÇÕ ÆùÆ®ÀÇ glyph ºÎÁ·
=======================
ÇÑÅÒ Á¶ÇÕ ÆùÆ®·Î ÀϺΠ¿¾ ÇѱÛÀ» Ãâ·ÂÇÒ ¼ö ÀÖ¾úÀ¸³ª,
À¯´ÏÄڵ峻ÀÇ ¿¾ ÇÑ±Û Àڸ𿡠ºñÇϸé ÅξøÀÌ ºÎÁ·ÇÕ´Ï´Ù.


ÇÑÅÒ Á¶ÇÕ ÆùÆ®¸¦ Àç¹èÄ¡Çϰųª ÀÌ¿¡ µ¡ºÙÀÓÀ¸·Î½á ´©¶ôµÈ ÇÑ±Û ÀÚ¸ð¸¦
Ãß°¡½ÃŲ ÈÄ, ´ÙÀ½ ÄÚµå º¯È¯ Ŭ·¡½º¸¦ ¾à°£¸¸ ¼öÁ¤ÇÏ¸é ¸ðµç ¿¾ÇÑ±Û (¾à
50¸¸ÀÚ °¡·®)À» È­¸é¿¡ Ãâ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.


ÇÏÁö¸¸, ¿¾Çѱ۱îÁö °í·ÁÇßÀ» ¶§, ÇÑÅÒ Á¶ÇÕ ÆùÆ®ÀÇ ¼³°è (Áߺ¹µÈ Ãʼº
glyph 10°³¾¿, Áߺ¹ Áß¼º glyph 3 ~ 4°³¾¿, Áߺ¹µÈ Á¾¼º glyph 4°³¾¿)°¡
¿©ÀüÈ÷ ÃæºÐÈ÷ À¯È¿ÇÑÁö´Â Àß ¸ð¸£°Ú½À´Ï´Ù.


¿¾ÇÑ±Û Ãâ·Â¿¡ ´ëÇؼ­´Â °³ÀÎÀûÀ¸·Î´Â ±×´ÙÁö Çʿ伺À» ´À³¢Áö´Â ¸øÇÏÁö¸¸,
ÄÄÇ»ÅÍ°¡ Á¤º¸ Ç¥ÇöÀÇ ÀÚÀ¯¸¦ Á¦ÇѽÃÅ°±âº¸´Ù´Â º¸´Ù ½±°Ô Á¤º¸¸¦ Ç¥Çö,
ÀúÀå, Àü´ÞÇÒ ¼ö ÀÖ´Â ¼ö´ÜÀÌ µÇ¾î¾ß ÇÑ´Ù´Â º¸´Ù Å« °üÁ¡¿¡¼­ º»´Ù¸é,
ÇÑÅÒ Á¶ÇÕ ÆùÆ®°¡ ÀÌ¿Í °°ÀÌ È®ÀåµÇ°í, ±× ÆùÆ® ÀÎÄÚµùÀÌ Æø³Ð°Ô ¹Þ¾Æµé¿©Áö´Â
Ç¥ÁØÀÌ µÇ´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù°í º¾´Ï´Ù.


¶ÇÇÑ, ±×·¡¾ß¸¸ ±× ÄÚµå º¯È¯ Ŭ·¡½º°¡ JDK¿¡ ³»ÀåµÇ¾î ¹èÆ÷µÉ ¼ö ÀÖ°í,
µû¶ó¼­, ÀÏ¹Ý »ç¿ëÀÚ°¡ ÄÚµå º¯È¯ Ŭ·¡½º¸¦ ¼³Ä¡ÇÏ´Â ¹øÀâÇÔÀ» ÇÇÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù.
(ƯÈ÷, ¾ÖÇø´ÀÇ °æ¿ì)


2. JDK 1.2beta3ÀÇ ¹®ÀÚ Ãâ·Â ·çƾÀÇ ¹®Á¦Á¡
===============================
ÄÚµå º¯È¯ Ŭ·¡½ºÀÇ convert ¸Þ½îµå°¡ Ãâ·ÂÇÒ ¹öÆÛ´Â
ÄÚµå º¯È¯ Ŭ·¡½º¸¦ »ç¿ëÇÏ´Â Ãø¿¡¼­ Á¦°øÇÏ¿©¾ß Çϸç,
À̶§, ÃæºÐÇÑ Ãâ·Â ¹öÆÛÀÇ Å©±â¸¦ Àâ¾ÆÁÖ´Â µ¥
»ç¿ëµÇ´Â ¸Þ½îµå°¡ getMaxBytesPerChar ¸Þ½îµåÀÔ´Ï´Ù.
ÀÌ¿Í°°ÀÌ Çϸé, JDK 1.1.6±îÁö´Â ¹®Á¦¾øÀÌ µ¿ÀÛÇϳª,
JDK 1.2beta3¿¡¼­´Â ´ÙÀ½°ú °°Àº ¿¹¿Ü°¡ ¹ß»ýÇÏ¿©
ÇÑ±Û À½ÀýÀÌ Ãâ·ÂµÇÁö ¾Ê½À´Ï´Ù.


java.lang.ArrayIndexOutOfBoundsException: 4
at CharToByteX11Johab.composeHangul(CharToByteX11Johab.java:331)
at CharToByteX11Johab.convert(CharToByteX11Johab.java:70)
at sun.awt.PlatformFont.makeConvertedMultiFontChars(PlatformFont.java:471)
at sun.awt.motif.X11Graphics.drawMFChars(Native Method)
at sun.awt.motif.X11Graphics.drawChars(X11Graphics.java:351)
......


¿øÀÎÀº makeConvertedMultiFontChars ¸Þ½îµå³»¿¡¼­
getMaxBytesPerChar ¸Þ½îµå¸¦ »ç¿ëÇÏÁö ¾Ê°í
¹«Á¶°Ç Ãâ·Â ¹öÆÛÀÇ Å©±â¸¦ 4 ¹ÙÀÌÆ®·Î Àâ¾ÆÁÜÀ¸·Î½á
Hanterm Á¶ÇÕ ÆùÆ®ÀÇ 6 ¹ÙÀÌÆ® Ãâ·ÂÀ» ¼ö¿ëÇÏÁö ¸øÇϱ⠶§¹®ÀÎ °ÍÀ¸·Î º¸À̸ç,
ÀÌ´Â Á¶ÇÕÇü ÆùÆ®¸¦ »ç¿ëÇÏ´Â µ¥ »ó´çÈ÷ ½É°¢ÇÑ ¹®Á¦ÀÔ´Ï´Ù.


3. JDK 1.2beta3ÀÇ À̹ÌÁö ¹öÆÛ¸µ ¹ö±×
=================================
ÆùÆ® ÇÁ·ÎÆÛƼ È­ÀÏ°ú ÄÚµå º¯È¯ Ŭ·¡½º¸¦ ¼³Ä¡Çصµ,
AWT ÄÄÆ÷³ÍÆ® (ƯÈ÷, TextField, TextArea)µéÀº ÀÌ¿¡ µû¶ó ÀûÀýÈ÷ µ¿ÀÛÇÏÁö ¾Ê½À´Ï´Ù.


±×·¯³ª, drawString, drawChars ¸Þ½îµå¸¦ »ç¿ëÇÏ¿© Ãâ·ÂÇÒ ¶§´Â
ÀÌ·¯ÇÑ ¹®Á¦°¡ »ý±âÁö ¾Ê½À´Ï´Ù.
µû¶ó¼­, AWT ÄÄÆ÷³ÍÆ®¿Í´Â ´Þ¸® JDK 1.1.x¿¡¼­ÀÇ Swing ÄÄÆ÷³ÍÆ®´Â À̵é
È­ÀÏÀÇ ¼³Ä¡¿¡ µû¶ó Á¦´ë·Î µ¿ÀÛÇÕ´Ï´Ù.


JDK 1.2beta3¿¡¼­´Â ¹öÆÛ¸µÀ» »ç¿ëÇÏ¿© Ãâ·ÂµÈ ÇѱÛÀÌ È­¸é¿¡´Â
Ãâ·ÂµÇÁö ¾Ê´Â ¹ö±×°¡ ÀÖ½À´Ï´Ù.


Swing ÄÄÆ÷³ÍÆ®¸¦ »ç¿ëÇÏ´Â °æ¿ì, ÀϹÝÀûÀ¸·Î Image Ŭ·¡½º¸¦ »ç¿ëÇÏ¿©
´õºí ¹öÆÛ¸µÀ» Çϸ鼭 µ¿ÀÛÇÏ°Ô µÇ¹Ç·Î, JDK 1.2beta3¿¡¼­ÀÇ Swing
ÄÄÆ÷³ÍÆ®¿¡¼­´Â ÇѱÛÀÌ Á¦´ë·Î Ãâ·ÂµÇÁö ¾Ê½À´Ï´Ù.
¹°·Ð, ´õºí ¹öÆÛ¸µÀ» ÇÏÁö ¾Ê°í Swing ÄÄÆ÷³ÍÆ®¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù¸¸,
È­¸é ¹Ý¦ÀÓ Çö»ó¶§¹®¿¡ º°·Î ÁÁÀº ¹æ¹ýÀÌ µÇÁö ¸øÇÕ´Ï´Ù.



========== CharToByteX11Johab.java (ÄÚµå º¯È¯ Ŭ·¡½º) ============


/*
* @(#)CharToByteX11Johab.java 1.0 98/05/03
*
* Purposes:
* 1. Enable displaying all 11,172 Modern hangul syllables with Hanterm
* johab fonts on Unix
* 2. Enable displaying some of Unicode 2.0 ancient hangul syllables
* with Hanterm johab fonts on Unix
* 3. Enable displaying all of Unicode 2.0 ancient hangul syllables with
* possible future extended Hanterm johab fonts on Unix
*
* Installation Instructions:
* 1. Install Hanterm Johab fonts and a proper font property file to Unix system.
* (Confer http://calab.kaist.ac.kr/~dtkim/java/ )
* 2. Make a directory "jdk1.x.x/classes/"
* 3. Compile this class into "jdk1.x.x/classes/"
*
* Author: Deogtae Kim , 98/05/03
*
* Based on: Hanterm source code adapted by Jungshik Shin
*/


import sun.io.CharToByteConverter;
import sun.io.MalformedInputException;
import sun.io.UnknownCharacterException;
import sun.io.ConversionBufferFullException;


public class CharToByteX11Johab extends CharToByteConverter
{
int state = START;


public static final int START = 0;
public static final int LEADING_CONSONANT = 1;
public static final int VOWEL = 2;


int l = 0x5f; // leading consonant
int v = 0; // vowel
int t = 0; // trailing consonant


/*
* This method indicates the charset name for this font.
*/
public String getCharacterEncoding()
{
return "X11Johab";
}


/*
* This method indicates the range this font covers.
*/
public boolean canConvert(char ch)
{
if ( 0xac00 <= ch && ch <= 0xd7a3 // Modern hangul syllables
|| 0x1100 <= ch && ch <= 0x1112 // modern leading consonants (19)
|| 0x1113 <= ch && ch <= 0x1159 // ancient leading consonants (71)
&& lconBase[ch-0x1100] != 0
|| ch == 0x115f // leading consonants filler
|| 0x1160 <= ch && ch <= 0x1175 // modern vowels (21)
|| 0x1176 <= ch && ch <= 0x11a2 // ancient vowels (45)
&& vowBase[ch-0x1160] != 0
|| 0x11a8 <= ch && ch <= 0x11c2 // modern trailing consonants (27)
|| 0x11c3 <= ch && ch <= 0x11f9 // ancient trailing consonants (55)
&& tconBase[ch-0x11a7] != 0 )
return true;
return false;
}


/*
* This method converts the unicode to this font index.
* Note: ConversionBufferFullException is not handled
* since this class is only used for character display.
*/
public int convert(char[] input, int inStart, int inEnd,
byte[] output, int outStart, int outEnd)
throws MalformedInputException,
UnknownCharacterException
{
charOff = inStart;
byteOff = outStart;


for (; charOff < inEnd; charOff++)
{
char ch = input[charOff];
if (0xac00 <= ch && ch <= 0xd7a3)
{
if ( state != START )
composeHangul(output);
ch -= 0xac00;
l = (ch / 588); // 588 = 21*28
v = ( ch / 28 ) % 21 + 1;
t = ch % 28;
composeHangul(output);
} else if (0x1100 <= ch && ch <= 0x115f)
{ // leading consonants (19 + 71 + 1)
if ( state != START )
composeHangul(output);
l = ch - 0x1100;
state = LEADING_CONSONANT;
} else if (1160 <= ch && ch <= 0x11a2)
{ // vowels (1 + 21 + 45)
v = ch - 0x1160;
state = VOWEL;
} else if (0x11a8 <= ch && ch <= 0x11f9)
{ // modern trailing consonants (27)
t = ch - 0x11a7;
composeHangul(output);
} else
{
throw new UnknownCharacterException();
}
}


if ( state != START )
composeHangul( output );


return byteOff - outStart;
}


public int flush(byte output[], int i, int j)
throws MalformedInputException
{
byteOff = 0;
int len = 0;
if ( state != START )
{
composeHangul( output );
len = byteOff;
}
byteOff = charOff = 0;
return len;
}


public void reset()
{
byteOff = charOff = 0;
state = START;
l = 0x5f;
v = t = 0;
}


public int getMaxBytesPerChar()
{
return 6;
}


// The base font index for leading consonants


static final short[] lconBase = {
// modern leading consonants (19)
1, 11, 21, 31, 41, 51,
61, 71, 81, 91, 101, 111,
121, 131, 141, 151, 161, 171,
181,


// ancient leading consonants (71 + reserved 5 + filler 1)
0, 0, 0, 0, 0, 0, // \u1113 ~ :
0, 0, 0, 0, 0, 201, // \u1119 ~ :
0, 221, 251, 0, 0, 0, // \u111f ~ :
0, 0, 281, 0, 0, 0, // \u1125 ~ :
191, 0, 211, 0, 231, 0, // \u112b ~ :
0, 241, 0, 0, 0, 291, // \u1131 ~ :
0, 0, 0, 0, 0, 0, // \u1137 ~ :
0, 0, 0, 261, 0, 0, // \u113d ~ :
0, 0, 0, 0, 0, 0, // \u1143 ~ :
0, 0, 0, 271, 0, 0, // \u1149 ~ :
0, 0, 0, 0, 0, 0, // \u114f ~ :
0, 0, 0, 0, 301, // \u1155 ~ :
0, 0, 0, 0, 0, // \u115a ~ : reserved
0, // \u115f : leading consonant filler
};


// The base font index for vowels


static final short[] vowBase = {
// modern vowels (filler + 21)
0,311,314,317,320,323, // (Fill), A, AE, YA, YAE, EO
326,329,332,335,339,343, // E, YEO, YE, O, WA, WAE
347,351,355,358,361,364, // OI, YO, U, WEO, WE, WI
367,370,374,378, // YU, EU, UI, I


// ancient vowels (45)
0, 0, 0, 0, 0, 0, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
0, 0, 0, 0, 0, 0, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
0, 0, 381, 384, 0, 0, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
387, 0, 0, 0, 0, 0, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
0, 0, 0, 390, 393, 0, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
396, 0, 0, 0, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
0, 0, 0, 0, 399, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
0, 402, 0 // \u11a0 ~ : ARAEA-U, ARAEA-I,SSANGARAEA
};


// The base font index for trailing consonants


static final short[] tconBase = {
// modern trailing consonants (filler + 27)
0,
405, 409, 413, 417, 421,
425, 429, 433, 437, 441,
445, 459, 453, 457, 461,
465, 469, 473, 477, 481,
485, 489, 493, 497, 501,
505, 509,


// ancient trailing consonants (55)
0, 0, 0, 0, 0, 0, // \u11c3 ~ :
0, 0, 0, 0, 0, 0, // \u11c9 ~ :
0, 0, 0, 0, 0, 0, // \u11cf ~ :
0, 0, 0, 0, 513, 517, // \u11d5 ~ :
0, 0, 0, 0, 0, 0, // \u11db ~ :
0, 0, 0, 0, 0, 0, // \u11e1 ~ :
0, 0, 0, 0, 0, 0, // \u11e7 ~ :
0, 0, 0, 525, 0, 0, // \u11ed ~ :
0, 0, 0, 0, 0, 0, // \u11f3 ~ :
521 // \u11f9:
};


// The mapping from vowels to leading consonant type
// in absence of trailing consonant


static final short[] lconMap1 = {
0,0,0,0,0,0, // (Fill), A, AE, YA, YAE, EO
0,0,0,1,3,3, // E, YEO, YE, O, WA, WAE
3,1,2,4,4,4, // OI, YO, U, WEO, WE, WI
2,1,3,0, // YU, EU, UI, I


// ancient vowels (45)
3, 4, 3, 3, 3, 4, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
4, 3, 4, 3, 3, 3, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
1, 1, 3, 3, 3, 1, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
3, 4, 4, 4, 4, 2, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
3, 3, 3, 3, 3, 2, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
4, 2, 2, 4, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
3, 4, 3, 0, 1, 3, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
2, 3, 1 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
};


// The mapping from vowels to leading consonant type
// in presence of trailing consonant


static final short[] lconMap2 = {
5,5,5,5,5,5, // (Fill), A, AE, YA, YAE, EO
5,5,5,6,8,8, // E, YEO, YE, O, WA, WAE
8,6,7,9,9,9, // OI, YO, U, WEO, WE, WI
7,6,8,5, // YU, EU, UI, I


// ancient vowels (45)
8, 9, 8, 8, 8, 9, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
9, 8, 9, 8, 8, 8, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
6, 6, 8, 8, 8, 6, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
8, 9, 9, 9, 9, 7, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
8, 8, 8, 8, 8, 7, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
9, 7, 7, 9, 5, 5, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
8, 9, 8, 5, 6, 8, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
7, 8, 6 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
};


// vowel type ; 1 = o and its alikes, 0 = others
static final short[] vowType = {
0,0,0,0,0,0,
0,0,0,1,1,1,
1,1,0,0,0,0,
0,1,1,0,


// ancient vowels (45)
1, 0, 1, 1, 1, 0, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
0, 1, 0, 1, 1, 1, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
1, 1, 0, 0, 0, 0, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
0, 0, 0, 0, 0, 0, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
0, 0, 0, 0, 0, 0, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
0, 0, 0, 0, 0, 0, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
0, 0, 0, 0, 0, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
0, 0, 0 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
};


// The mapping from trailing consonants to vowel type


static final int[] tconType = {
0, 1, 1, 1, 2, 1,
1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1,
1, 1, 1, 1,


// ancient trailing consonants (55)
1, 1, 1, 1, 1, 1, // \u11c3 ~ :
1, 1, 1, 1, 1, 1, // \u11c9 ~ :
1, 1, 1, 1, 1, 1, // \u11cf ~ :
1, 1, 1, 1, 1, 1, // \u11d5 ~ :
1, 1, 1, 1, 1, 1, // \u11db ~ :
1, 1, 1, 1, 1, 1, // \u11e1 ~ :
1, 1, 1, 1, 1, 1, // \u11e7 ~ :
1, 1, 1, 1, 1, 1, // \u11ed ~ :
1, 1, 1, 1, 1, 1, // \u11f3 ~ :
1 // \u11f9:
};


// The mapping from vowels to trailing consonant type


static final int[] tconMap = {
0, 0, 2, 0, 2, 1, // (Fill), A, AE, YA, YAE, EO
2, 1, 2, 3, 0, 0, // E, YEO, YE, O, WA, WAE
0, 3, 3, 1, 1, 1, // OI, YO, U, WEO, WE, WI
3, 3, 0, 1, // YU, EU, UI, I


// ancient vowels (45)
3, 3, 3, 3, 3, 3, // \u1176 ~ : A-O, A-U, YA-O, YA-YO, EO-O, EO-U
3, 3, 3, 1, 0, 0, // \u117c ~ : EO-EU, YEO-O, YEO-U, O-EO, O-E, O-YE
3, 3, 3, 1, 0, 3, // \u1182 ~ : O-O, O-U, YO-YA, YO-YAE, YO-YEO, YO-O
0, 0, 0, 0, 0, 3, // \u1188 ~ : YO-I, U-A, U-AE, U-EO-EU, U-YE, U-U
0, 1, 1, 1, 1, 3, // \u118e ~ : YU-A, YU-EO, YU-E, YU-YEO, YU-YE, YU-U
1, 3, 3, 3, 2, 2, // \u1194 ~ : YU-I, EU-U, EU-EU, YI-U, I-A, I-YA
3, 3, 3, 1, 3, 0, // \u119a ~ : I-O, I-U, I-EU, I-ARAEA, ARAEA, ARAEA-EO
3, 2, 3 // \u11a0 ~ : ARAEA-U, ARAEA-I, SSANGARAEA
};


void composeHangul(byte[] output)
{
int ind;



if ( lconBase[l] != 0 )
{ // non-filler and supported by Hanterm Johab fonts
ind = lconBase[l] + ( t > 0 ? lconMap2[v] : lconMap1[v] );
output[byteOff++] = (byte) (ind / 256);
output[byteOff++] = (byte) (ind % 256);
}


if ( vowBase[v] != 0 )
{ // non-filler and supported by Hanterm Johab fonts
ind = vowBase[v];
if ( vowType[v] == 1)
{ //'o' and alikes
// GIYEOK and KIEUK got special treatment
ind += ( (l == 0 || l == 15) ? 0 : 1)
+ (t > 0 ? 2 : 0 );
}
else
{
ind += tconType[t];
}


output[byteOff++] = (byte) (ind / 256);
output[byteOff++] = (byte) (ind % 256);
}


if ( tconBase[t] != 0 )
{ // non-filler and supported by Hanterm Johab fonts
ind = tconBase[t] + tconMap[v];
output[byteOff++] = (byte) (ind / 256);
output[byteOff++] = (byte) (ind % 256);
} else
{
output[byteOff++] = (byte) 0;
output[byteOff++] = (byte) 0;
}


state = START;
l = 0x5f;
v = t = 0;
}
}




´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]