Newbie font questions -- please help!

My apologies to those who visit the puppygames.net LWJGL forums, as i’ve posted this message there too. I’m just quite desparate for an answer :frowning:


Being a complete novice at programming in general, i’ve found LWJGL to be relative easy to pick up. (I come from a flash background)

That said, i’m curious as to whther it’s possible to display proportional-width fonts well in LWJGL? I know that you need to create a bitmap beforehand and reference that – but having seen Thom Wetzel’s bitmap font builder which allows for the saving of font metrics in an external file – i’m really really hoping that it can be done.

Additionally, with fonts in LWJGL (fixed-width or otherwise) is it easy to

  • scale / rotate them easily in 2d?
  • adjust opacity?

I’ve seen a number of tutorials on fonts in LWJGL, but they appear to be biased towards fixed-width outcomes.

Thanks for reading. I love everything about LWJGL so far, just this darn font thing which is getting in the way :slight_smile:

http://puppygames.net/forums/viewtopic.php?p=5289

Scaling is easy (glScale) but will be subject to mipmapping artifacts as these are raster fonts not vector fonts. See puppygames post for adjusting opacity.

If you’d like a pre-made font to play with just ask and I’ll generate it for you with the SPGL tool.

Cas :slight_smile:

Cas, thanks so much! you wouldn’t believe how much better i feel :slight_smile:

Re: that pre-made font, i would be very happy if you could send it my way. (if you have the time)

In the meantime, i’m off to decipher the stuff at SPGL. wish me luck :stuck_out_tongue:

Proportional fonts are basically the same as fixed pitch fonts… however when creating the display lists you just take the width of each character into account. That’s the whole idea (you can for example export the widths in Bitmap Font Builder as C stuff… you can take that stuff the way it is… you only need to change the type declaration line to: private static int[] charSize = yadda yadda… well it’s pretty hard coded then).

The result can already look perfectly fine, but it depends on the used font.