Default font file, zeroes and special chars...

For developmental things relating to the graphics of the game.
Post Reply
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Default font file, zeroes and special chars...

Post by wrtlprnft »

The default font file (font_s.png) doesn't have a way to distinguish between o's and zer0es and misses a few characters available on german keyboards, so I added them to it...

Here's my changed version:
Image

I know some chars don't exactly look great, but how do you put '¼' in such a small area?

I'd like to see my changes in the next version, it would solve a lot of dumb questions when ppl want to know how colors work, like that:
Player 1: how do i get colored text?
wrtlprnft: try typing 0xff0000red (possible if you type 00xffff88xff0000red)
Player 1: oxffoooored
Player 1: doesn't work :/
wrtlprnft: its all zeroes
Player 1: oxff0000
wrtlprnft: the 1st one, 2
Player 1: 0xffoooo
wrtlprnft: ALL zeroes!
Player 1: red
Player 1: oh thanks
Player 1 left the game
I didn't change the large font file yet, but I can if you want.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Taken. I was indeed wondering whether the new default instantchat contained pron. Yes, it'd be extremely cool if you could add those and the other missing characters to the big font, too. That would make Supertard happy, he's using them so his name does not appear correctly above his cycle :)
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

I could only add the chars that are either on my keyboard or in one of the files, and I could only check the ones I could enter into my keyboard... that means that I can't test É, for example.

Then I noticed that some chars are in different spots in font_s.png and font_extra.png... Could someone take my GIMP source file and check if that can be correct (watch all the ÉÈÊs) (switch the layers on and off to see)?

It would be sweet if someone had a complete list of all the chars that are supposed to go in there...

Another change I made was that I changed all the shades of gray that were in use for antialiasing into alpha transperency... sometimes if a white font appeared over a white area (like the rim wall with textures disabled) you could see little gray spots.

Ok, and here come my files :)
Image
Image
Image
(Reload this page to see my changes in font_s.png)

Edit: I just see that they seem to be in ASCII/ANSI order...
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Ok, here comes my new file :)
Image

New source file

Edit: There's a screenshot of my chars :)
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Cool, I'll play with it a bit.
Walking Tree
Match Winner
Posts: 641
Joined: Sun Jul 10, 2005 9:14 am

Post by Walking Tree »

42 lol...
on the grid as ~free::zombie~
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Well it's all the meta keys, you shouldn't enter them anyways...
its just that you can enter something like

Code: Select all

blah Admin:·blah····························································································································
The game seemingly replaces all · by spaces, but it doesn't wrap the spaces, so all goes in one line which gets broken onto the next line... Result looks like this:

Code: Select all

wrtlprnft |mbc|: blah
Admin: blah
That's why I'm filling it all up with spaceholders (see the 42 as an easteregg).

Ok, I'll now start the font_s.png file, but I can't guarantee all of the chars will look great...
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Filling up the empty spaces with stuff is a good idea. Something more compression-friendly, like just a small dot, would be better IMHO.

Your first version of font_s.png, where you did not yet modify the color values, seems to be liked better. Can you make it so that you reach your goal of no black spots and the font stays unchanged when rendered above a black surface? What you did brightened up the rim, and that looks a bit blurrier. Doing
newalpha = oldalpha * oldcolor
newcolor = 1
should work. I'll fire up Gimp and see if I can do it in a minute.
Edit: No, I'm lost. I can't figure out how to simply copy some bloody data into the alpha channel the way I want it. I get something into there no problem, but it's even blurrier.

I'll change the rendering code so that the font looks the same when rendered with alpha blending on a black background and without alpha blending. We had the blurring problem before when alpha blending was disabled.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

I see, strange. I found a way, but it seems to modify the color information (alphatransparent selections don't seem to work too well :/).
I tried a different way and it seems to work better.

Image
Image
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

I'd say the last version is better, but...
Is there actually a difference between the last font_s and the very first one you posted? Or has that just been overwritten?
Anyway, it's not blurry any more, I guess that's all what counts.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

I overwrote it, so they're all the same now...
But the original font_s.png and my version look almost the same in gameplay now, exept for the additional chars.

Next time I've got a mouse (laptop) I'll update font_s to contain all the chars.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Ah, that explains it. Thanks in advance for the rest of the chars!
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Ok, I'm finished. Those are my files (they all changed a bit):
http://wrtlprnft.ath.cx/font.png
http://wrtlprnft.ath.cx/font.xcf
http://wrtlprnft.ath.cx/font_s.png
http://wrtlprnft.ath.cx/font_s.xcf
http://wrtlprnft.ath.cx/font_extra.png
http://wrtlprnft.ath.cx/font_extra.xcf

Some characters in font_s look messed up, so if you find a better way to squish '»', '«', '©', '®' or 'æ' into 5 pixels width (minus one for spacing), please let me know... Also some characters look almost the same, like 'ó' and 'Ó', simply because the accent doesn't fit on top of an 'O'...

btw, what is the point of the small font file anyways? On most resolutions it gets stretched to the size of the big one...
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Thanks!

The point of font_s is that the big font, when scaled down by the grapic card, looks ugly. Yes, the small font looks ugly when scaled up, but that's no comparison to the big font scaled down:
http://forums.armagetronad.net/viewtopi ... 7751#37751
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Here's a special version of my font file for people who hate CAPS... It removes the caps and adds underlining with a thin line... have fun with it.
Attachments
font_s.png
font_s.png (2.02 KiB) Viewed 14313 times
Post Reply