VBE fun, #2

posted in Journal #259850
Published March 26, 2006
Advertisement
I spent the whole day working on the English glyphs. I wasn't happy with the ugly look in the previous entry, so I took a screenshot of an anti-aliased font, zoomed in, and started a pixel-by-pixel struggle of epic proportions, crafting the glyphs by hand, in C. I could've probably written a program to do it, but I sometimes like to brute-force my way through things (especially when I know it's going to take less than a day). Here's how it looks like now:



Each glyph is a 14x8 array of uint8s. Each element takes a value from 0 to 9, where 0 represents the background color and 9 represents the foreground (text) color. The renderer then converts this number to a a floating point value [0, 1] and uses it for blending. The only downside to this so far is that the glyph representations are no longer clear in the code:

[snip]		// 35 - '#'		{			{0, 0, 0, 0, 0, 0, 0, 0},			{0, 0, 0, 0, 0, 0, 0, 0},			{0, 0, 0, 8, 5, 4, 9, 0},			{0, 0, 0, 9, 4, 5, 8, 0},			{0, 0, 4, 8, 0, 7, 7, 0},			{4, 9, 9, 9, 9, 9, 9, 9},			{0, 0, 7, 5, 0, 9, 4, 0},			{0, 0, 9, 0, 4, 8, 0, 0},			{9, 9, 9, 9, 9, 9, 9, 5},			{0, 6, 7, 0, 8, 4, 0, 0},			{0, 7, 6, 3, 9, 3, 0, 0},			{0, 9, 4, 5, 8, 0, 0, 0},			{0, 0, 0, 0, 0, 0, 0, 0},			{0, 0, 0, 0, 0, 0, 0, 0}		},		// 36 - '$'		{			{0, 0, 0, 0, 0, 0, 0, 0},			{0, 0, 0, 0, 0, 0, 0, 0},			{0, 0, 0, 0, 9, 0, 0, 0},			{0, 4, 7, 9, 9, 9, 7, 4},			{0, 8, 5, 0, 9, 0, 4, 8},			{0, 9, 4, 0, 9, 0, 0, 0},			{0, 5, 8, 7, 9, 4, 0, 0},			{0, 0, 4, 5, 9, 5, 8, 5},			{0, 0, 0, 0, 9, 0, 0, 9},			{0, 8, 4, 0, 9, 0, 5, 8},			{0, 4, 7, 9, 9, 9, 7, 4},			{0, 0, 0, 0, 9, 0, 0, 0},			{0, 0, 0, 0, 9, 0, 0, 0},			{0, 0, 0, 0, 0, 0, 0, 0}		},[/snip]


Now, I really have one thing to say before going off to sleep: Rawrrrrrrrrrrrrrrrrrrrrrrrr.
Previous Entry VBE fun
Next Entry Damn
0 likes 1 comments

Comments

Mushu
RAAWWWRRRR!!~
March 26, 2006 04:29 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Opera 9 w000000t

1269 views

Damn

1157 views

VBE fun, #2

1266 views

VBE fun

1307 views

French, #1

1393 views

Mult-tasking

1153 views

DirectInput hooking

1039 views

MDX overlay sample

1309 views
Advertisement