Spritefonts and Korean / Hangeul

Discussion and feedback on Construct 2

Post » Thu Mar 10, 2016 6:47 pm

I assume the answer is no, but I will ask anyway. Does the spritefont plugin support Hangeul, the Korean writing system?
B
6
S
2
Posts: 12
Reputation: 426

Post » Fri Mar 11, 2016 12:31 pm

In theory, yes - SpriteFont works by looking up a single character (which can be any character) and representing it with a section of the image. However I'm not sure how unicode-correct this process is. Have you tried it? Also some languages use hundreds or thousands of characters, which make them unsuitable for sprite fonts, since you'd need a huge image with loads of content. Web fonts might be a better alternative for that.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095

Post » Fri Mar 11, 2016 5:53 pm

I have not attempted to do so yet. I'll go ahead and build a test.
B
6
S
2
Posts: 12
Reputation: 426

Post » Fri Mar 11, 2016 7:31 pm

Good news. Theory is confirmed. It works.

CAPX
https://drive.google.com/file/d/0B64kEQ ... sp=sharing

Some explanation is helpful. Hangeul consists of a 24 letter alphabet. However, unlike the English/Latin alphabet, it is not written sequentially. It is written in syllabic blocks. Thus, a word like Korea is written as 한국 (han-guk). This contains the letter sequence of ㅎㅏㄴㄱㅜㄱ.

I read through some of the Unicode material on how Hangeul is encoded. It encodes the letters ㅎㅏ ㄴ as three unique characters and 한, a syllabic block, also as a unique character. This creates an "interesting" problem.

There are more than 11,000 possible syllabic blocks. Though, not all of them are phonologically possible in modern Korean. I believe it still numbers somewhere in the thousands. This means one might reasonably need to create a rather large image file. That would be game dependent of course, but it still makes me a little sad. :(

For reference, see the following Unicode PDFs.

http://www.unicode.org/charts/PDF/U1100.pdf
http://www.unicode.org/charts/PDF/UAC00.pdf
B
6
S
2
Posts: 12
Reputation: 426

Post » Sat Mar 12, 2016 12:47 pm

Good to know it works. You could get away with using the minimum necessary for your game. But yeah, this is a tricky part of using sprite fonts.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests