Halo 2 Font
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Found my major roadblock and it consists of rewriting my code. As it stands now it just has pixel bits (on/off), but throwing up Arial-14 in paint and zooming displays opacity bits (which are the codes I'm having issues with). So time to implement opacity pixels...
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: Halo 2 Font
This is great work Troy. I can't wait to see what becomes of this. Do you think there is a possibility of adding new objects to the fonts? I always liked the idea of the killjoy medal.

- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Without a doubt. The file format is simple, just the encoding is complicated. I'm thinking it may be easier to try and pull the decoding routine from the XBE (and more precise as well).
I can already modify characters manually. You could even make your own characters right now, they just would not be memory optimized.
The low down on the format if you wish to make your own characters is:
1) don't set bit 7 (these are special codes)
2) calculate pixel runs up to 0x3F in length (uses wrap around at line ends)
3) For blank runs, keep bit 6 = 0, for solid runs make bit 6 = 1
eg (8x4 character)
The preceeding can be made like so:
0x03 0x42 0x01 0x42
0x02 0x43 0x02 0x41
0x01 0x43 0x03 0x44
0x03 0x42
Note the 0x44 is due to a run of 4 (1 at line end, 3 at next line start).
Data can be added to the end of the file, which would just require changing a blank listing in the index to point at a new listing at the end of the UTF list table.
I can already modify characters manually. You could even make your own characters right now, they just would not be memory optimized.
The low down on the format if you wish to make your own characters is:
1) don't set bit 7 (these are special codes)
2) calculate pixel runs up to 0x3F in length (uses wrap around at line ends)
3) For blank runs, keep bit 6 = 0, for solid runs make bit 6 = 1
eg (8x4 character)
Code: Select all
_ _ _ X X _ X X
_ _ X X X _ _ X
_ X X X _ _ _ X
X X X _ _ _ X X
0x03 0x42 0x01 0x42
0x02 0x43 0x02 0x41
0x01 0x43 0x03 0x44
0x03 0x42
Note the 0x44 is due to a run of 4 (1 at line end, 3 at next line start).
Data can be added to the end of the file, which would just require changing a blank listing in the index to point at a new listing at the end of the UTF list table.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Update. Slowly getting there. This may look worse than previous images, but arial-14 uses anti-aliasing whereas arial-13 and fixedsys-9 don't. The white and black are the normal run methods, while the light blue is a coded run, the dark purple is a coded post-skip and the dark green (not shown) is a coded pre-skip. I have coloring disabled ATM as the pre- & post-skips are more inportant for me finding the proper codes.

Also, changed some code so now I can actually load up all the fonts. Before I was having to search through all 65,536 entries for each character and some fonts have +32,000 entries. So doing the math, I was pretty much doing over 2,097,152,000 comparisons.
Let's just say that I never waited long enough for those ones to finish, I just had code to cut it at 1800 entries. Now I can actually see all characters in the fonts (and I must say I think I can just make out the looks of a sniper rifle in one of the entries
)

Also, changed some code so now I can actually load up all the fonts. Before I was having to search through all 65,536 entries for each character and some fonts have +32,000 entries. So doing the math, I was pretty much doing over 2,097,152,000 comparisons.


- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
http://www.remnantmods.com/archive/misc ... Viewer.rarJacksonCougar wrote:Awesome, care to share the source so others can poke around too?
and also if needed:
http://www.remnantmods.com/archive/misc ... 2Fonts.rar
Code has been documented now. Codes are all out of order, but as you will see I have them ordered with the character I was working on at the time. I figure as I add more codes, if I come across some that aren't right, they should show up and I'll adjust them accordinly, but so far I've only found maybe 2 codes that need re-examining.

I have 73 / 128 codes done so far.
Last edited by troymac1ure on Tue Feb 19, 2013 8:16 am, edited 1 time in total.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Add alot more codes in. Arial-14 is all readable now, with only minor glitches to be fixed.
Also, with the additions, here is a show of conduit-16:

Take notice of the second to last row, where you can clearly see (very left) the starting formation of the skull, followed by a few almost recognizable guns.
Also, right near the end, clear as day, is an apple..
Also, with the additions, here is a show of conduit-16:

Take notice of the second to last row, where you can clearly see (very left) the starting formation of the skull, followed by a few almost recognizable guns.
Also, right near the end, clear as day, is an apple..

- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Managed to get pretty much all the characters in all the fonts working. Just need to work on special symbols (guns, kill streaks, etc). Also I arranged all the codes in order now and added color. The white boxes in the post above are actually all different colors with a seperate colored strip running across the top of them. Added a few other codes as well based apon how the preceding/following codes were set.
There's still something weird with code 00 (Color) though as some of the characters change colors multiple times without drawing anything, so I assume that two colors in a row must draw a set pixel run or something.
So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font
There's still something weird with code 00 (Color) though as some of the characters change colors multiple times without drawing anything, so I assume that two colors in a row must draw a set pixel run or something.
So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font

- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: Halo 2 Font
Pretty sure a Windows Font type can't contain colors, but I'm certain that fonts can be produced. I'll look into it for you. Just focus on getting the characters perfecttroymac1ure wrote:So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font


- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Halo 2 Font
Create a bitmap font and make a custom control/class to render it.
Don't snort the magic, we need it for the network.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
They look pretty darn good, but the only way I could get it perfect is to use disassembled code. Right now it's all by eye.Click16 wrote:Pretty sure a Windows Font type can't contain colors, but I'm certain that fonts can be produced. I'll look into it for you. Just focus on getting the characters perfecttroymac1ure wrote:So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: Halo 2 Font
Pics?troymac1ure wrote:They look pretty darn good, but the only way I could get it perfect is to use disassembled code. Right now it's all by eye.

- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font


and here's how the extras are coming along:

- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Thanks. I'm gone for a couple days, so I should have lots of time to work on it tomorrow night, but no XBOX. Can anyone u/l a clear (BMP, not jpg) screen shot of as many medals as possible (post-game should be fine). This would give me something to look at for comparisons.
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: Halo 2 Font
That should be straightforward for Sav3r (a program I never have used). Also, I remember an animated bitmap of the thumb stick being pressed. Because it happens in a single space, I wonder if the font includes animation data. I think it was a two state animation, so maybe two bitmaps have pointers to each other and something else controls the timing.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
That'll be easier to determine once all the characters are decoded properly and can be seen. Also, I've just used Yelo Neighbourhood for the pics in the past. It works well.CaptainPoopface wrote:That should be straightforward for Sav3r (a program I never have used). Also, I remember an animated bitmap of the thumb stick being pressed. Because it happens in a single space, I wonder if the font includes animation data. I think it was a two state animation, so maybe two bitmaps have pointers to each other and something else controls the timing.
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: Halo 2 Font
Just out of curiosity, what plans do people have if fonts can be decoded entirely? There isn't much I would do... It would be cool to make my own weap icons, but maybe more trouble than it's worth.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
Originally I wanted to have the proper font for my visual menu editor and since it's something that hasn't been accomplished before, the idea interested me. Now that I'm this far along, I may as well finish it off. It's just one more thing to be unlocked for the H2 archives. Every time I add a new code I see more characters appearing and it makes me giggle a little insideCaptainPoopface wrote:Just out of curiosity, what plans do people have if fonts can be decoded entirely? There isn't much I would do... It would be cool to make my own weap icons, but maybe more trouble than it's worth.

- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: Halo 2 Font
Besides, wouldn't you like to create a custom font package for you mod? You might be able to add new weapon icons or change the colours around to match a custom hud.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font
A major breakthough! Need to sleep, but have a few hours at the airport waiting for my plane tomorrow, so I'll see how far I can get and post an updated pic!
Let's just say I was right in assuming that every color change auto-places a pixel as well
Let's just say I was right in assuming that every color change auto-places a pixel as well

- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Halo 2 Font
XZodia Likes This.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Halo 2 Font


115/128 codes complete. I'm not bothering with the others as all english fonts load with no unknown codes now.

Now to figure out what's going on with the color scheme, then I'll repost the source.
Last edited by troymac1ure on Sat Feb 23, 2013 8:42 pm, edited 1 time in total.
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: Halo 2 Font
Oh man when I saw those images, I literally had chills going down my back. This is fantastic troy. I can't believe you're doing this. I... I don't even know what to say.
