Allow Unicode and specifying font in printing text in .cel

The place to discuss creating, porting and modifying Celestia's source code.
yaohua2000
Posts: 6
Joined: 31.12.2004
With us: 19 years 10 months
Location: China
Contact:

Post #21by yaohua2000 » 28.10.2005, 17:44

Joe wrote:yaohua2000

It may be possible with Windows using OpenGL's wglUseFontOutlines function, but not sure it work with other OS.


As a Mac user, I did some research and it is also possible in Mac OS X.

So I think to use OS-native font support to render text, or at least make it as an option and let users choose if use .txf. Since for those CJK users, this is an *absolutely* important feature, and should be in our priority of future development.

Topic author
Rex
Posts: 10
Joined: 19.02.2005
With us: 19 years 8 months

Post #22by Rex » 10.12.2005, 10:47

I got it.
I will first translate scripts "The Nine Planets" in the next a few weekends.

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #23by georgiouk » 13.01.2006, 15:58

Hi.
I am trying to translate Celestia into Greek and although i have changed the menu I cant figure out what to do next to change the rest of it.

Any ideas?

georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 6 months
Location: Greece

Post #24by georgiouk » 16.01.2006, 14:22

Hi.
How can I compile txfutil to get ttf2txf.exe works?
(I know that it is a really silly question but I am a beginner in programming so please forgive me for making this question).


Thanks in advance.
Koula Georgiou.

GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 19 years

Post #25by GlobeMaker » 16.01.2006, 17:27

georgiok asked, "How can I compile txfutil to get ttf2txf.exe works?"

You can use the command line compiler , like you did to compile celestia.exe .

You used makerelease.bat to compile celestia.exe , right?
If you open up makerelease.bat you can see what it does and you can
edit this to compile other files.

Here is what is in that file :
cd src
nmake /f winbuild.mak CFG=Release %1 > ../compile2.txt
cd ..
copy src\celestia\Release\celestia.exe .

See it uses winbuild.mak. Open that file and see what it does. You can edit the lines to do your special build :
_________________________________
cd celestia
nmake /nologo /f celestia.mak clean CFG=$(CFG)
cd ..
.
.
.
$(APPCELESTIA): $(LIBS)
cd celestia
nmake /NOLOGO celestia.mak CFG=$(CFG)
cd ..
___________________________________________

You see it calls another file called celestia.mak.
You need to make a custom file to replace that file, which has lines like

OBJS=\
$(INTDIR)\avicapture.obj \
$(INTDIR)\celestiacore.obj \
$(INTDIR)\configfile.obj \
$(INTDIR)\destination.obj \
$(INTDIR)\eclipsefinder.obj \

________________________________________

Conclusion
To compile from the command line, you can edit files to replace the files
that compiled celestia.exe . I hope you read all the instructions by other people in this forum about the .zip file and the README file which says :


Requirements:

* OpenGL http://www.opengl.org/
* GLUT http://www.opengl.org/developers/docume ... /glut.html
* Freetype 2.0 http://www.freetype.org/


It is complicated and you need to link all the right files and libraries.
So try some experiments with editing makerelease.bat and the file
it calls, and the file that file calls.

Do you have OpenGL and GLUT and Freetype 2.0 ?
Your wish is my command line.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 3 months
Location: Lyon (France)

Post #26by Christophe » 18.01.2006, 22:12

As a reminder there is an online font texture generator and previewer here.

The issue of rendering font oulines directly in OpenGL has been discussed many times before. To summarize:
- OpenGL widgets may or may not be able to render text in overlays depending on the toolkit. Besides possible unavailability of this solution on some platforms, this would have some practical issues to integrate with the current overlay rendering code.
- Open Source libraries are available, but until now Chris has been reluctant to add another dependency to Celestia, the current solution being seen as "good enough". I think that for CJK support it would be worthwhile to investigate this solution further (maybe making it a compile-time option). Basically what is needed is to tweak or derive the Overlay class.
Christophe

Topic author
Rex
Posts: 10
Joined: 19.02.2005
With us: 19 years 8 months

Post #27by Rex » 19.01.2006, 14:06

I have compiled txfutil in this package:
http://www.cnblogs.com/Files/Rex/CelestiaCNPatch.rar


Return to “Development”