Suitable txf font required for SQL overlay.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Suitable txf font required for SQL overlay.

Post #1by marc » 11.04.2003, 01:08

Ive sucessfully got celestia (mostlyharmless) running with an embedded mySQL database providing star information and filtering.
Ive set it up so the user can enter an SQL query to display any selection of stars. (similar to the way you press Enter to type in the name of a target)

I have a little problem with the fonts.
The fonts with celestia are missing some important characters <>= which makes it hard to type queries.

Ive done a bit of a google to find some more txf fonts and tried them out by modifying celestia.cfg
So far I've tried out fonts that I found in Plib and FlightGear. There are some good ones but, they are all a little big.

Ideally I'd like a bold courier that is about the same size as celestia's helvbold12.txf font. (the one that shows the star info). Having the fixed width characters makes lining up tables easy.

Does anyone have any suitable fonts lying around?
I have a big courier.txf, is there any way to resize it?
What is the easiest way to create txf's?

Thanks in advance.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #2by chris » 12.04.2003, 16:25

Very cool project!

The only tools that I know work for building .txf files run on UNIX. Do you have a UNIX system? Otherwise, I can try and build a .txf for you with the missing characters.

--Chris

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #3by chris » 12.04.2003, 17:09

I just generated some new font files:

http://www.celestiaproject.net/~claurel/celestia/fonts/

There are 10, 12, 20, and 30 point sans serif fonts with all the extra characters.

--Chris
Last edited by chris on 12.04.2003, 17:49, edited 1 time in total.

billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #4by billybob884 » 12.04.2003, 17:26

Error "Object not found!"
Mike M.

TacoTopia!

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #5by chris » 12.04.2003, 17:50

billybob884 wrote:Error "Object not found!"

Oops . . . you're right! I edited my post and fixed the link.

--Chris

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #6by marc » 14.04.2003, 01:12

Thanks Chris, I have a linux system, what is the name of the application?
Is it easy to convert a large txf to a smaller one?
The sans font should work well for the queries, but ill still need a non true type font for displaying tables.

There are two courier fonts here (with all the characters) which id like to shrink.
http://rockfish.net/cgi-bin/cvsweb/Flig ... og#dirlist
If its quick to do i would be grateful for some 10, 12 and 16s of these fonts, otherwise just point me towards the linux app and ill have a go myself.

I moved house recently and have been struggling to get back online, (aussie DSL is a shitfight), once thats done Ill be able to get a release out to show this off.

Thanks

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #7by chris » 14.04.2003, 06:39

Here's the package:

http://www.celestiaproject.net/~claurel/txfutil-1.0.0.tar.gz

Unpack it, and just type make :) Actually, you might need to tweak the Makefile a bit, but it was easy to get working. You can use it on any TrueType file. Here's a very simple shell script I use to generate the different sizes:

#!/bin/sh

Code: Select all

chars='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-
_=+[]{}|;:,.<>~"/?'

./ttf2txf -o sans10.txf -s 10 -w 128 -h 128 -c \ $chars ARIAL.TTF
./ttf2txf -o sans12.txf -s 12 -w 128 -h 128 -c \ $chars ARIAL.TTF
./ttf2txf -o sans20.txf -s 20 -w 256 -h 128 -c \ $chars ARIAL.TTF
./ttf2txf -o sans30.txf -s 30 -w 256 -h 256 -c \ $chars ARIAL.TTF


(otherwise I'll accidentally omit characters . . . and the one I forgot most often was the space character!)

The program is the work of Karl Robillard (wickedsmoke@users.sourceforge.net), so if you find it useful, you should thank him.

The README contains a pointer to Mark Kilgard's (creator of GLUT) txf font biulder, too. It uses standard X fonts; however I've gotten better results with TrueTypes and Karl's ttf2txf.

--Chris

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #8by marc » 26.04.2003, 16:22

Thanks.
I've used the above program with a few changes to the script and source and have now got the fonts i need.

Code: Select all

!#/bin/sh
chars='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
./ttf2txf -o ocraext8.txf -s 8 -w 128 -h 64 OCRAEXT.TTF -c \ \!\@\#\$\%^\&\*\(\)-_=+{}[]\\\|\;\:\'\"\<\>\,\.\?\/\`\~$chars

A few of those characters needed to be escaped. so i just escaped them all.

I changed the source to reduce the spacing between lines for the smaller fonts.

Im finally back on broadband which makes me a happy happy vegemite. :D

Guest

Post #9by Guest » 29.04.2003, 06:38

i doubt if they have ever heard of a happy vegemite is in seattle.


Return to “Development”