Feature Request - Print Modifications

General discussion about Celestia that doesn't fit into other forums.
Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Feature Request - Print Modifications

Post #1by Bob Hegwood » 05.02.2004, 16:20

It's me again...

Would very much like to see some improvements within the cel scripting language which would allow a user to print text:

A - In a different color.
B - Using different fonts.
c - With Bold, Underline, Italics capabilities.

Just thought I'd mention it. The SaturnTour is *killing* me. Whew!

Harry?

Maybe this capability already exists in celx?

Thanks, Bob
Bob Hegwood
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.0 Pre6 FT1

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 9 months
Location: Colorado, USA (7000 ft)

Post #2by don » 05.02.2004, 22:10

Howdy Mr. H.,

Funny you should mention these things. I am currently working on script-related font additions and changes right now (CEL based to begin with). 8O

A short introduction into the fonts Celestia uses, which I have only learned in the past few days ...

* Celestia uses OpenGL for *all* display purposes, including graphics and fonts.

* OpenGL supports several different types of font formats and font manipulation.

* Chris selected the Texture font type (.TXF) in OpenGL. Texture fonts are fonts that are specified as texture files, with a pre-defined compliment of characters *inside* the .TXF file.

* Texture fonts look bad when re-sized or manipulated in any way, thus Chris has created several .TXF fonts of various faces, attributes (normal and bold), and size, which are distributed with Celestia and located in the /celestia/fonts directory.

* There are not any Windows programs that create .TXF font files. :cry: However, Chris has modified a Linux TrueType to TXF font conversion program to create .TXF fonts for use in Celestia, and also added the necessary UTF-8 characters: (http://www.shatters.net/~claurel/celestia/fonts/tt2txf/).

:idea: If someone could port this app to Windows, then Windows users could create any Celestia fonts we wanted to!

I'm not nearly as fast as Harald is, so he will probably have all of this up and running in Lua before I'm anywhere near to being finished with the CEL version, should he decide to add it to his ever-growing TODO list. 8O

Cheers,

-Don G.

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Post #3by Bob Hegwood » 05.02.2004, 22:58

Mr. Goyette Sir... :wink:

I don't really want to screw around with adding fonts, I just want to be able to USE them. :wink:

Let me try again:

I would like to have the ability to be able to print (via cel script) text on the screen in a different color. This would be nice if I'm trying to explain a feature that covers the screen, and is close to being a shade of white. The rings of Saturn are a good example.

I would like to be able to use features like Bold, italics, underline - again from within a cel script - in order to emphasize certain features which are being presented from within the script.

I'd be happy to use the fonts provided with Celestia, as long as they offered the features described above?

Am I making sense? Could some addition be made to the cel script 'print' command in order to allow the above?

Or, is this another of those impossible dream kinda things? I really don't know BEANS about the cel scripting language. But I *do* know how to use it now.

At any rate, I just thought ask. Thanks very much for the attention.

Take care, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 7 months
Location: Germany

Post #4by Harry » 05.02.2004, 23:13

I haven't yet really looked into this, but from what I've seen I think it would be fairly easy to change the color and maybe change to another font for the complete text you see at once on the screen. Mixing colors or fonts is much harder.

So I think it doesn't matter whether it's Lua or CEL-scripting, it's just the question whether the core of celestia supports it.

Harald

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Post #5by Bob Hegwood » 05.02.2004, 23:45

Thanks Harry,

I guess I'm just not making myself clear here. Let me provide an example which might clear things up.

The following prints Welcome to Saturn! when I run it from within a cel script. It's always in the same font, and it's always white text. I have control over where it prints - and its duration - but that's about it.

print {text "Welcome to Saturn!" row -4 column 1 duration 10.0}

What I'm after is a revised PRINT command such that the color and italics, etc can be controlled from within the command. For example:

print {text "<B>Welcome</B> to <I>Saturn!</I>" row -4 column 1 duration 10.0 color [0 0 0] }

In THIS example, "Welcome" would be printed in BOLD text, "Saturn" would be printed in Italics, and the whole sentence would be Black in color. Do you see what I'm getting at?

Is this a possibility, or would the whole Lua language have to be re-written?

Thanks very much, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 9 months
Location: Colorado, USA (7000 ft)

Post #6by don » 05.02.2004, 23:59

Howdy Bob,

SIR, YES SIR! 8O :)

Like I wrote above ... "Funny you should mention these things. I am currently working on script-related font additions and changes right now (CEL based to begin with)."

Two nights ago I sent Chris a set of modified core source files that allow message text in Celestia to have a font of it's own. Currently, the message text font is also the title font. You can change the TitleFont in celestia.cfg, but when you do, the titles (like Object names) appear in the same font as script text.

The next step is to hook this into scripting (CEL and/or Lua). Since changing the existing print command could possibly break existing scripts, my plan is to add a second print command that will allow for things such as font file definition, font color, auto word-wrap, and text alignment -- all in a single command.

Don't know about underlining, whether this is possible in the above mentioned tt2txf converter program or not.

As Harald pointed out, changing the font or color on a line-by-line basis will not be easy. But, I will attempt it anyway. :)

What I attempted to explain in my message above, is that Celestia does *not* use "normal" fonts, as we all have on our computers for word processing, etc. Celestia uses specially created texture files. If you want a Times Roman, Bold, Italic font, then you have to create a texture file for it, with the above mentioned program.

Thus, it is not a simple matter of saying, "give me the Times Roman font, in bold face, and make it italic too" in Celestia <sigh>.

Cheers,

-Don G.

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Post #7by Bob Hegwood » 06.02.2004, 00:10

Okay Mr. Goyette...

I gotcha! Thanks for the information.

To be honest with you, I'd be happy ENOUGH with the ability to change the color, but it sounds like you guys are already way ahead of me here.

Image You ARE the MAN Don.

Thanks again, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 9 months
Location: Colorado, USA (7000 ft)

Post #8by don » 06.02.2004, 00:13

Bob Hegwood wrote:Image You ARE the MAN Don.

Nahhh, just one of the team, which by the way includes you Bob, and every other contributing user. :)

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 9 months
Location: Colorado, USA (7000 ft)

Post #9by don » 11.02.2004, 01:29

Update

Well, after submitting my first set of changes for this, Chris wrote back that he wasn't sure if he wanted to make these kinds of changes in Celestia or not. So, I have stopped work on this until Chris decides if it is okay or not.

-Don G.

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Post #10by Bob Hegwood » 11.02.2004, 02:37

don wrote:Update

Well, after submitting my first set of changes for this, Chris wrote back that he wasn't sure if he wanted to make these kinds of changes in Celestia or not. So, I have stopped work on this until Chris decides if it is okay or not.


Oh sure...

Get my hopes up and then DASH them to the ground in one fell swoop!

Sheesh!

Thanks, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 9 months
Location: Colorado, USA (7000 ft)

Post #11by don » 11.02.2004, 03:01

Sorry Bob. You'll have to get in line with the rest of us in the "dashed hopes" group. Chris still hasn't actually made a decision, so who knows. Lots of folks have asked for this kind of thing in the past, but it never made it into Celestia. Maybe this was why? We'll see.

It's not something I could do in an add-on module either, as the core code of Celestia is where text handling is processed. Which means Celestia itself needs to be modified if we want this capability.

Keep your fingers crossed!

-Don G.

Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 6 months
Location: Germantown, Ohio - USA

Post #12by Bob Hegwood » 11.02.2004, 06:28

Don,

How about if I offered to write more scripts?

Any tool that could make the script-writing chore a bit quicker and/or easier oughtta be worth *some* consideration should it not?

I know that you brainy scientist types don't see much value in script-writing, but if you had any idea how time-consuming this process is - and how much pleasure the non-scientist types get from their use - you might wish to reconsider the importance that this feature holds for the average joe.

Now, is this Celestia project just for brainy rocket scientists? Or, is it also a vehicle for attracting the working stiffs and getting THEM interested in what *used* to be a boring picture and lecture type subject?

I know... I know... I've gone and done it again haven't I? Now everybody and his brother is gonna jump all over me again. Image

Love ya's, Bob

PS - Just for you Mr. #2 - The Saturn Tour is almost finished. Give me one more week I think. Whew!
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1


Return to “Celestia Users”