Page 1 of 2
H2 Font Editor
Posted: Fri Mar 15, 2013 8:35 am
by troymac1ure
In relation to the information found here:
viewtopic.php?f=85&t=2267
Here is the first <known> Halo 2 font editor. It requires you to have the H2 fonts already to use it (can be found on disc).
Just select your base font, the new font output name, load your image (8bpp, 24bpp RGB, 32 ARGB supported), select the slot to import to (existing or new) and choose your own Unicode value to link to it (not needed if replacing an existing image)
H2 Font Editor Program (v1.0):
* As with all my source code, feel free to use, learn, copy, modify whatever as you like. Credit is always nice if you do use it, but meh.
H2 Font Viewer Program:
H2 Font Editor Program & source can also be found on the misc FTP server:
ftp://ftp.remnantmods.com/Troy%20Mac1ur ... ntEdit.rar
Source Code:
ftp://ftp.remnantmods.com/Troy%20Mac1ur ... Source.rar

Re: H2 Font Editor
Posted: Fri Mar 15, 2013 10:06 am
by XZodia
OMG I just thought of the best use for this! To put ranks into custom games!
How To Do It:
Extract the rank images from the menu
Add the rank images to a font
Add a label next to each players name in the custom game screens
Assign a single character string to each of these
Use RTH to set the players ranks
mbmb?
Re: H2 Font Editor
Posted: Fri Mar 15, 2013 1:26 pm
by CaptainPoopface
This man needs a ticker tape parade. I'm going to have fun thinking of ways to use this. Is it possible to make the characters so close together that you can make a long contiguous image constructed from single characters?
Re: H2 Font Editor
Posted: Fri Mar 15, 2013 1:52 pm
by xxpenguinxx
Does the font image display in full size or does it scale to the font size ingame?
Looks sexy btw!
Re: H2 Font Editor
Posted: Fri Mar 15, 2013 3:13 pm
by XZodia
@troy Does this mean your going to release your menu GUI editor soon? =)
Re: H2 Font Editor
Posted: Fri Mar 15, 2013 4:51 pm
by troymac1ure
Don't get your hopes up! Last night as I was trying to u/l the photos to photobucket, my laptop shut down. The night before I left it on the couch for a few minutes and it got really hot. Realised after powering it back up that my fan wasn't working.
Funny part is, I was programming on it for like 3 hours before that.
Anyways, I need to get a new fan before I do much more. I'll see if I can at least get the code for this up.
Also, like your idea for rankings, but those damn modders will probably hack it pretty easily

Re: H2 Font Editor
Posted: Sat Mar 16, 2013 9:21 pm
by troymac1ure
Well, I dismantled my laptop and even though it's like 8 years old it was pretty much clean inside except for one large piece of fuzz in the fan. So cleaned it out and fan seems to be good now. See how it goes I guess.
For those interested I posted the source now for the font editor (link in first post).
Re: H2 Font Editor
Posted: Sun Jun 08, 2014 1:57 am
by supersniper
does anyone still have this?
Re: H2 Font Editor
Posted: Sun Jun 08, 2014 2:39 pm
by XZodia
It should be on the ftp server
Re: H2 Font Editor
Posted: Sun Jun 08, 2014 9:38 pm
by troymac1ure
Just uploaded it here and placed a new link in the first posting for you.
Also, uploaded my first font viewer (for my trials before I made the editor). Using it will give more info on how the font layout is done and gives a nice preview of the fonts.
CaptainPoopface wrote:This man needs a ticker tape parade. I'm going to have fun thinking of ways to use this. Is it possible to make the characters so close together that you can make a long contiguous image constructed from single characters?
Not sure how I missed a couple of posts, but this shows the in-game guns in the text (Hold "A" to pickup...) so the characters can be variable widths if you are looking to do long symbols.
Re: H2 Font Editor
Posted: Sun Jun 08, 2014 9:53 pm
by DoorM4n
I seriously can't believe I missed this. Holy crap this is awesome!
Re: H2 Font Editor
Posted: Mon Jun 09, 2014 3:25 pm
by neodos
Awesome work!
Is that a volkswagen logo? haha! interesting placeholder.
Re: H2 Font Editor
Posted: Mon Jun 09, 2014 5:12 pm
by troymac1ure
neodos wrote:Awesome work!
Is that a volkswagen logo? haha! interesting placeholder.
This is the first smaller bitmap I came across on my computer (not surprising as I work for VW).
This allows for custom fonts/symbols/etc, but each injected symbol is not space optimized at all. Just uses run-lengths (no patterns are used).
Thinking about it, one could set a pattern to the first position of a character and get a more precise visual of each pattern. When I made this, I just started by assuming all patterns were 3 length and adjusted to make the fonts fit correctly, then guessed at different shades until they looked right. Now that pattern lengths are all correct, it would be a lot easier to get more precise shade values. I think they also use alpha transparency as well, so that's something else again.
Re: H2 Font Editor
Posted: Mon Jun 09, 2014 5:26 pm
by supersniper
Thanks a bunch! this is useful for me in Halo 2 Vista, as well. I'm trying to add in new medals to the empty slots.
EDIT: just crashes when I select the fonts folder.
The font viewer Works however.
Re: H2 Font Editor
Posted: Mon Jun 09, 2014 7:40 pm
by troymac1ure
Are you using this on Vista Fonts? I haven't tested it with Vista although I'd expect they'd be fairly much the same. I will look into the crashing thing. As a side note, are you running as Admin? I think it gets/stores the fonts folder to registry if I remember correctly (same registry keys as all my H2 programs (Entity, etc) uses).
Got it to run on this machine. Place an "EDITED" Folder in your fonts folder before starting it. If the EDITED folder is not there AND the "HKCU\Software\Xbox\Halo2\Paths\Fonts" registry entry doesn't exist, it seems to crash.
Re: H2 Font Editor
Posted: Tue Jun 10, 2014 5:54 pm
by DoorM4n
Yeah crashed on me when I opened. I'll do the registry trick.
Re: H2 Font Editor
Posted: Tue Jun 10, 2014 7:45 pm
by troymac1ure
DoorM4n wrote:Yeah crashed on me when I opened. I'll do the registry trick.
Or easier is to just create a folder named "EDITED" in whatever font folder you first choose. After that it seems to do the rest for you.
Also, It seems a bit confusing with location to import, UTF codes, etc now that I look at it, but if you open up the font viewer as well and mouse hover over the desired character, it will provide those details for you to input into the editor.
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 1:31 am
by supersniper
I'm trying to find the index number for a character beyond the 2000 limit but it crashes everytime I hit no.
Is there any way to specify what Unicode I want to edit? or do I have to provide the index number?
and if so How do I find it if I can't load past 2000 characters.
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 9:19 am
by troymac1ure
Not sure. I have been looking at the code for an hour now and trying to come up with a better method. Each font character is an image and it doens't like having 14000 images on screen at once. 2000 seems okay.
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 12:24 pm
by XZodia
Well you could break it up into the different languages, perhaps?
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 2:56 pm
by supersniper
Or, even keep the increments of 2000, but add an option to load which specific set of 2000. 1-2000; 2001-4000
etc.
Because mainly I want to patch this set of Unicode characters
81E4, 82E4, 83E4, 84E4, 85E4, 86E4, 87E4, 88E4, 89E4
in the Korean fonts because in Halo 2 Vista when someone enters those codes anywhere... it just crashes the game. So if I replace the image with a different one, essentially it should fix it.
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 5:10 pm
by troymac1ure
XZodia wrote:Well you could break it up into the different languages, perhaps?
Each font file basically is already.
I think I may lock the window width and then just have one bitmap for each line of fonts, so each will contain approximately 20 characters. Since I can load 2000 picture boxes alright and I know one font has 14,000 characters:
14000 / 20 = 700 picture boxes
Memory is not an issue, it's just number of controls on the panel I think, so this would help a lot. Either that or have it load by pages (would be easier to keep background highlighting).
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 6:08 pm
by supersniper
do which ever one is less of a hassle.
Also when replacing an image does it need to be a specific file format? I know halo 2 is 8bit images. do I have to convert the image or just leave it as is?
Re: H2 Font Editor
Posted: Thu Jun 12, 2014 7:51 pm
by troymac1ure
I can't remember. I know above I said in one post I used A8R8G8B8 format (internally maybe?). I think I just used a PNG file for my tests, but any JPG, BMP, PNG should work fine. I believe I just have it load a standard image and then convert it in the program to the right format.
EDIT:
troymac1ure wrote:
Just select your base font, the new font output name, load your image (8bpp, 24bpp RGB, 32 ARGB supported), select the slot to import to (existing or new) and choose your own Unicode value to link to it (not needed if replacing an existing image)
so yeah, any 256 color or 24/32-bit bmp/jpg/png should work.
Re: H2 Font Editor
Posted: Sat Jun 14, 2014 8:45 pm
by troymac1ure
Geez, what time was I writing my code at?
This may take a while I need to re-organize my code so I can understand it. lol
The actual font reading class is very well setup and documented, but after that I think I just started smashing the keyboard until something compiled.
Started late last night and forgot to backup my old code first. Anyways, just got it loading again (without selection abilities). It now also compiles H2Font into a DLL for those that wish to use it on their own.
Now to fix the font character selection and add pages