Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: TheDerman on January 15, 2006, 10:50:16 PM

Title: Font colours and letter spacing
Post by: TheDerman on January 15, 2006, 10:50:16 PM
Hello,

I'm using bitmap font builder to make some fonts into TGA files - then I import the TGA into WME and create the .font file - everything fine so far...

The first problem is that some fonts don't display with even spacing between letters - longer letters like M and W are closer to the next letter than A for example, which resuilts in big spaces in the middle of words.

The second problem is that if I save a TGA with an alpha channel in Font Builder the only colours that come through in WME are black and white. If I use any other colour in font builder, WME just displays it as gray.

Any ideas?

Thanks.
Title: Re: Font colours and letter spacing
Post by: metamorphium on January 15, 2006, 11:22:56 PM
Regarding the second issue, there is nothing more easy than opening the result image for example in GIMP and
then choose replace color to whatever color you like by using simple replace color function. ;)

The problem would be in font builder because I use colored fonts normally.

Title: Re: Font colours and letter spacing
Post by: Columbo on January 16, 2006, 12:23:46 AM
Regarding the width, the only thing that directly effects the width is in the .font file. The line :

AUTO_WIDTH = TRUE

Should solve this problem. If it does not, there may be an issue with the way the TGA file is saved.

Personally however I always use .BMP files with a magenta background, and don't run into either the width or the colourisation problems you seem to be experiencing.

Regarding the bulk colour change, I would agree with metamorphium's idea of opening in GIMP (or Paint Shop Pro, or Photoshop or whatever it is you use) and doing a colour-to-colour change. There's no quicker way of doing it to my knowledge.

Good luck!
Title: Re: Font colours and letter spacing
Post by: Mnemonic on January 16, 2006, 08:59:48 AM
Also make sure some of the letters don't "overflow" to the neighbouring cell. When antialiasing is enabled, Bitmap Font Builder sometimes has this problem (a few pixels of the antialiased edge extend to the other cell, which causes WME incorrectly reading the width of a character).
Title: Re: Font colours and letter spacing
Post by: TheDerman on January 16, 2006, 10:19:01 AM
I don't know about replacing any colours - opening the file in Photosop reveals a blank image - bitmap font builder is not even saving any colours at all it seems. Maybe I'll try and make my own images.

And none of the letter are overflowing as they're not big enough - plenty of room.

Are there any plans in the future to make handling fonts easier in WME? I mean like in Photosop I select my font, enable anti-aliasing, and it gives a nice font with smooth edges, regardless of the font size. The addition of ttf fonts in WME is nice but don't I need font smoothing enabled in Windows to make them smooth? What about people without Windows XP? What about smaller fonts that don't get smoothed? Is there no way to have WME anti-alias the ttf fonts itself, and then embed them somehow so I don't have to include the actual font file outside my data file? All that would make life a lot easier.  ;D
Title: Re: Font colours and letter spacing
Post by: odnorf on January 16, 2006, 11:05:14 AM
I don't know about replacing any colours - opening the file in Photosop reveals a blank image - bitmap font builder is not even saving any colours at all it seems. Maybe I'll try and make my own images.

And none of the letter are overflowing as they're not big enough - plenty of room.

It's not about ovelapping each other. The problem is that sometimes antialiased letters are occupying some of the free space in the grid that belongs to some other letter. If you can upload it I can check what is wrong with it.
Title: Re: Font colours and letter spacing
Post by: Mnemonic on January 17, 2006, 04:27:08 PM
Are there any plans in the future to make handling fonts easier in WME? I mean like in Photosop I select my font, enable anti-aliasing, and it gives a nice font with smooth edges, regardless of the font size. The addition of ttf fonts in WME is nice but don't I need font smoothing enabled in Windows to make them smooth? What about people without Windows XP? What about smaller fonts that don't get smoothed? Is there no way to have WME anti-alias the ttf fonts itself, and then embed them somehow so I don't have to include the actual font file outside my data file? All that would make life a lot easier.
Title: Re: Font colours and letter spacing
Post by: TheDerman on January 17, 2006, 06:58:21 PM
That's cool - I'm not complaining - just enquiring. I'm more than happy with WME as is.  8)