Page 1 of 1

How can I write some text in .cel script?

Posted: 18.11.2010, 03:09
by fly_space
Hello.

I want to write Korean consonant and vowel(
koreanconsonantvowel.jpg
), special text (like ?,?,?) in .cel script.

but when I run script in celestia,(
consonantvowelspecialtextcel.jpg
)

some texts turned into '?' (
consonantvowelspecialtexterror.jpg
)

How can I write that texts perfect?

Re: How can I write some text in .cel script?

Posted: 19.11.2010, 19:06
by jogad
Hello

This is not a script issue but rather a font issue.
These characters are just missing in the font used by Celestia to display the text of the script.

I think that we can report this as a bug.

Until the Celestia team fixes it with a consistent solution, here is a workaround.

- Save and rename the file sansbold20_ko.txf in the font directory of Celestia.
- Download the file that you will find here:
http://www.sendspace.com/file/sz0fhk
(dont be confused by advertising, the link is at the bottom of the page)
- Unzip the file (sansbold20_ko.txf) in the font directory of Celestia

I get this result.

Image

For what is worth, the missing characters are in the range of unicode 1100 to 11FF

Well. This is only a workaround:
the font is different from the other Celestia smaller fonts. Moreover the file if rather big. Optimizations should occur. At last as I cannot read korean, I took the whole range from unicode AC00 to D7A3 for the hangul characters. It is maybe too much but I cannot help on this.

About the special characters like little heart or star, this is another story. These characters depend on the font in use and maybe there is no general solution for that.

regards

Re: How can I write some text in .cel script?

Posted: 21.11.2010, 02:02
by fly_space
jogad,

Sorry, but it worse than before.
consonantvowelspecialtexterrornew.jpg


but I don't know that this problem just happen to me, So I'll say this problem to my friends.
and I'll reply again.

-
My font directory is this
fontdirectory.jpg

Re: How can I write some text in .cel script?

Posted: 21.11.2010, 09:06
by jogad
Hi

fly_space wrote:but I don't know that this problem just happen to me, So I'll say this problem to my friends.
and I'll reply again.

Yes. There is actually not one problem but two problems.

I was surprised that you get some of the characters in your first screensho :roll: t. Because these caracters are actually missing in the default korean Celestia font.
The reason is probably that your text was not if the correct UTF-8 format. And your text editor performed some substitutions with geometric caracters in the default font.

Check your encoding.

notepad.png


When you open your script in notepad2 your must see ANSI as UTF-8 at the bottom of the window.

Does this help?


c

Re: How can I write some text in .cel script?

Posted: 23.11.2010, 12:22
by fly_space
I set UTF-8 already...

encoding.jpg

Re: How can I write some text in .cel script?

Posted: 23.11.2010, 15:02
by jogad
Hi,


It is very frustating because I can get it on my French machine and you cannot on your korean computer.

I have no much more idea of what is wrong.

One thing to try yet:
This is the script that works fine on my system.
korean.zip

Unzip but do not edit it and see if it works for you. (With the font you downloaded before).

And post your own script as an attached file (just in case...)

Re: How can I write some text in .cel script?

Posted: 04.12.2010, 05:43
by fly_space
Sorry, I was busy bacause an achievement test period Now.

I can't attatch My script (The extension cel is not allowed.)
So I give address about My blog post which have the script file.

http://blog.naver.com/wjdeogks18/10098651563

Re: How can I write some text in .cel script?

Posted: 04.12.2010, 16:43
by jogad
Hi,
fly_space wrote:I was busy bacause an achievement test period Now.
Best whishes to you for that :wink:

fly_space wrote:I can't attatch My script (The extension cel is not allowed.)
So I give address about My blog post which have the script file.
Yes. This is why I have zipped my script into a .zip file to post it.
Please use this method next time. It was not so easy for me to find the script among the korean text :oops:

Ok! the result is that my script works with the new font and yours does not. 8O
Once again this is a problem to have the right match between the caracters coded in utf8 and the ones which actually belong to the font.

The font that I posted uses the set 1100 to 11ff set of characters listed here
http://www.unicode.org/charts/PDF/U1100.pdf
And my script uses these characters.

Your script uses this set of characters:
http://www.unicode.org/charts/PDF/U3130.pdf
And they do not belong to the font.

You must produce a font that includes these codes from a korean ttf font.
You'll find a useful documentation to do that in the celestia wiki here:
http://en.wikibooks.org/wiki/Celestia/I ... nalization
(just look at the 'Building .txf font texture file' chapter)

You can use this text file to generate your font.
coreen2.zip
ah ah :lol: the .txt extension is not supported either :!:

Korean jamo are included but not the special chars. If you need them they are here:
http://www.unicode.org/charts/PDF/U25A0.pdf
http://www.unicode.org/charts/PDF/U2600.pdf

Regards :mrgreen:

Re: How can I write some text in .cel script?

Posted: 11.12.2010, 03:54
by fly_space
Hi,

I can't get txf utility because http://www.celestiaproject.net/~claurel/stuff/txfutil.tar.gz is prosen.

also, I don't know How can I 'Generate the .txf files' step. just copy and tipping each lines,
and save 'sans12_LL.txf', 'sans14_LL.txf' , 'sansbold20_LL.txf?'

(like this.
sans12_LL.txf ->ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 12 -o sans12_LL.txf font.ttf
sans14_LL.txf ->ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 14 -o sans14_LL.txf font.ttf
sansbold20_LL.txf ->ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 20 -o sansbold20_LL.txf font_bold.ttf
)

Re: How can I write some text in .cel script?

Posted: 11.12.2010, 16:14
by jogad
Hi Fly_space,

Glad to see that you do not give up! :D

Sorry! My explanations were not enough explicit and the available documentation that I pointed is rather short. :(

I'll try to give some precisions on how to do that step by step.

fly_space wrote:I can't get txf utility because http://www.celestiaproject.net/~claurel/stuff/txfutil.tar.gz is prosen.

This is is true but it is a problem only if you work with linux.
Most probably you have Windows and in this case the important link is the following:

Note for Windows users:
A pre-compiled version of ttf2txf is available at: http://gvince.perso.sfr.fr/celestia/dev/ttf2txf.zip
1) download this archive and extract the files in a directory of your choice. Say "txffonts".
- This directory contains now 5 files. (have a look at the readme.txt)

2) choose the korean font that contains all the characters you need, including the missing characters.
The easiest is to take the font used by your text editor to show the text of the script. This way you are sure that the required characters are present.
I call this font "font.ttf". You have to replace "font.ttf" by the actual name of that font.

3) copy "font.ttf" from the fonts directory of Windows to your newly created "txffont" directory

4) build the font
The font to build is sansbold20_ko.txf (the _LL means the 2 letters of the locale font)
Don't bother with sans12 and sans14. These fonts are not used to display scripts and have the required characters to display what is worth.

The command line
ttf2txf -w 1048 -h 1048 -f codepoints_LL.txt -s 20 -o sansbold20_LL.txf font_bold.ttf
becomes a little more explicit:
- ttf2txf is the conversion program
- sansbold20_LL.txf must be replaced by sansbold20_ko.txf
- font_bold.ttf must be replaced by your own korean ttf (true type) font
- maybe the given values for the font size(1048, 1048) are too small for an asian font and we'll have to find better values

But the codepoints_LL.txt remains mysterious. It is only a txt file that contains the list of the caracters' codes to include in the font.
codepoints_ko.txt contains "only" the 487 characters that are necessary to ensure the translation of Celestia. If your script uses other characters they will be missing.
The problem is to find a replacement file for codepoints_ko.txt. This is why I proposed the "coreen2.txt" in my previous post. This file contains 11456 codes of characters. Maybe it is too much but I cannot read korean and I cannot say more on this. Any help is welcome.
Anyway if you agree to use my coreen2.txt file instead of codepoints_ko.txt:

- copy coreen2.txt into the "txffonts" directory
- open a command window in this directory
- try to type the command line by replacing the parameters. In my example I use arialuni.ttf as korean source font and I get this:

buildfont.png

As you can see, the font is generated but the error message indicates that the texture is too small and then only 2486 characters (instead of 115456 as expected) are taken into account.

The solution is to increase the size of the texture. With -w 2480 and -h 2048 I get:

buildfont2.png

This time there is no error and the font is created correctly.
The correct values depend on the font you have chosen.
You have to experiment a bit :? but I suppose that you can take these value as a starting point.

- copy the newly created sansbold20_ko.txf in the "fonts" directory of celestia and you are done! :mrgreen:

PS
This is a kind of tutorial on how to build a txf font but not a definitive solution.
? propos... What is the original font used to generate the Celestia's korean font?
:?: Who knows? Chris? Vincent? an idea for an effective solution? :?:

Re: How can I write some text in .cel script?

Posted: 11.12.2010, 17:50
by Vincent
jogad wrote:This is a kind of tutorial on how to build a txf font but not a definitive solution.
? propos... What is the original font used to generate the Celestia's korean font?
:?: Who knows? Chris? Vincent? an idea for an effective solution? :?:
Hi Jo?l,

The Korean font texture was provided by our Korean translator Seung-Bum Lee.
One should be able to contact him via the email adress which is published on the
Celestia i18n Wiki page:
http://en.wikibooks.org/w/index.php?tit ... n&stable=0

Re: How can I write some text in .cel script?

Posted: 08.01.2011, 11:50
by fly_space
Hello, Happy New Year! :D

-

Actually, I can't solve this problem yet :(
But I still try to solve that solution. (+I need some information... But I don't know perfectly that information is what. give me more times... :? )