How to change font spacing in scoreboard

Everything about Modding the game, from new courts to the modifications of the player & tournament bases (and including all the bugs they may be creating ! ;) )
Forum rules
Speak English in 1st page of topics, and don't hijack topics, troll, use profanities nor insults

How to change font spacing in scoreboard

Postby antimouse » 05 Apr 2014, 00:55

Hello all,

I was playing with scoreboards and added a new font.
I correctly copied the HugeChars shader, as instructed by Manutoo in Rounders topic, put my own font name, changed the map path. The font loads correctly, but it displays with huge spaces between characters. Is this a problem with the font file or with something in my code? I used the Bitmap Font Builder recommended by HeinrichVonWestphalen.

The code is this:

Code: Select all
Font   LilF   Arial 11 14 0xFFB0AFAA 0 Circle Center Center Shadow0


Here is the screenshot:

problem.jpg


Thanks in advance!
You do not have the required permissions to view the files attached to this post.
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 527
Gaming Since: 06 Sep 2013, 01:05

Re: How to change font spacing in scoreboard

Postby manutoo » 05 Apr 2014, 03:30

Hello,

check your alpha channel is pure black ( = 0 ) and pure white ( = 255), with only a few anti-aliased pixels between the 2 extremes.
ie: the game engine needs the 0's to determine the size of each character.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15783
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: How to change font spacing in scoreboard

Postby antimouse » 05 Apr 2014, 05:11

I just checked and the alphas were 255 for the white characters and 1 (instead of 0) for the background.
I applied thresholding in the alpha channel through GIMP (since my Photoshop doesn't seem to read TGA files), made all 1's as 0's, but it didn't solve the problem. I suspect GIMP is not saving the file as 32-bit TGA. The file was 1MB and it saved as less than 100k. Do you know another software to deal with TGA?

EDIT: Well, I've managed to open it in Photoshop and saved the bitmap properly, 32-bit, with 0% or 100% alpha. The problem with scoreboards persists :(
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 527
Gaming Since: 06 Sep 2013, 01:05

Re: How to change font spacing in scoreboard

Postby Rounders » 05 Apr 2014, 15:00

antimouse wrote:I just checked and the alphas were 255 for the white characters and 1 (instead of 0) for the background.
I applied thresholding in the alpha channel through GIMP (since my Photoshop doesn't seem to read TGA files), made all 1's as 0's, but it didn't solve the problem. I suspect GIMP is not saving the file as 32-bit TGA. The file was 1MB and it saved as less than 100k. Do you know another software to deal with TGA?

EDIT: Well, I've managed to open it in Photoshop and saved the bitmap properly, 32-bit, with 0% or 100% alpha. The problem with scoreboards persists :(


Try this software antimouse http://www.codehead.co.uk/cbfg/
Image
Currently retired!
User avatar
Rounders
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 301
Gaming Since: 10 Apr 2012, 16:50
Location: Italy

Re: How to change font spacing in scoreboard

Postby antimouse » 05 Apr 2014, 16:08

Thank you very much Rounders! :D
Now it seems to work. I compared this file with the other I had generated before, and the difference is that it zeroes the entire RGBA channel. The previous file had 0 alpha, but full 255 RGB. Maybe that was the problem, I had understood from Manu's answer that only alpha mattered.
Anyway, the software you recommended is way better than the other. So thanks! :)
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 527
Gaming Since: 06 Sep 2013, 01:05

Re: How to change font spacing in scoreboard

Postby manutoo » 06 Apr 2014, 03:52

antimouse,
doh, sorry, yup I thought it was only the Alpha channel, but I just looked HugeChars and it's actually the RGB channel that matters ! ;)
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15783
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: How to change font spacing in scoreboard

Postby antimouse » 06 Apr 2014, 14:06

No problem, Manu ;)
And thanks also for your attention, I forgot to thank you in the last post :D
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 527
Gaming Since: 06 Sep 2013, 01:05


Return to Modding [Courts, Players, Tour, ...]

Who is online

Users browsing this forum: CCBot [Bot] and 0 guests