Author Topic: Question regarding fonts  (Read 1837 times)

0 Members and 1 Guest are viewing this topic.

Offline Lynx

  • 211
Question regarding fonts
Hey there,

Is it possible to make the game use another font than the stock ones for text like mission briefings, message tex and the likes? If so, how?
Give a man fire and he'll be warm for a day, but set fire to him and he'll be warm for the rest of his life.

 

Offline Grimloq

  • 29
  • Backslash enthusiast
uh, theres some thing called 'volition font' files in the VPs. i would guess those are the fonts, but i dont think theres any way to MAKE that kind of file. it doesnt use the standard(-ish) ones.
A alphabetically be in organised sentences should words.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
you can make new fonts, there is a tool, I don't know how to use it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
You have to use fonttool.  I played with it a little when porting to Linux but didn't really experiment that much.  Basically you use a PCX file set out in a particular format.  16 colors max, 0 is the background (should be black), 15 is the box outline color (probably green), 1-14 are shades between black and white used for the letters.  You create the PCX with boxes set into groups with the characters in a particular order.  After you use fonttool to convert the PCX to a VF (volition font) you can edit the kerning and then it should be ready to use in game.  Easy ain't it! :D

I didn't think so at first either.  Here is what font02.vf looks like in it's PCX form (from the Freespace 1 Demo VPs):

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
But you can only use one font at a time in game. Right?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by karajorma
But you can only use one font at a time in game. Right?

Right, but different sizes (font01, font02, font03).  Mods could include new fonts if they wanted though.  I was going to do one as a demonstration for TBP but the Babylon Industrial font is just too heavy weight to have readable at 8pt. and I don't want to fight with it at present.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
How would you go about selecting a different size in FRED?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by karajorma
How would you go about selecting a different size in FRED?

You don't, it's done in the code.  At least for all interface stuff.  Whenever something is set to be drawn to screen you call gr_set_font() to set FONT1, FONT2 or FONT3.  That's for the interface (menus, HUD stuff) but I suppose it would be possible to make something like a billboard floating in space with it's text controlled by a SEXP.  It should also be possible to make a font size change on the HUD controled by a SEXP, sort of like a modified EMP effect.  It would affect an entire string and not just individual characters which limits the coolness of it but maybe someone could make use of such a thing.  Assuming that something in FRED would use a specific text (like the requested name plate thing) then a SEXP setting the text would also be requesting which font and color to use.

The main problem with using fonts on a ship/model is that each character is drawn by itself so it would be rather slow to use.  I've been thinking about modifying the code to draw an entire string at the time but haven't had a chance to do it yet.  I'm really a bit too busy to think about any of that in detail right now but if you're interested in seeing something tagible then hit me up for it after Christmas.  Or you could get lucky and someone else will take care of it. :)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Actually MG would need font changes more for the debriefs and briefings. How possible would it be to add another qualifier (Like $h, $f etc ) to change the font size a word or paragraph at a time?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
I'm lucky, the Robotech mod would use the Robotech TT font. Just have to get it converted now...
"Don't think of it as being out-numbered, think of it as having a WIDE target selection!"

"I am the one and ONLY Star Dragon..."
Proof for the noobs:  Member Search

[I'm Just an idea guy, NOT: a modeler, texturer, or coder... Word of advice, "Watch out for the ducks!"]

Robotech II - Continuing...
FS2 Trek - Snails move faster than me...
Star Blazers: Journey to Iscandar...
FS GUNDAM - The Myth lives on... :)