H2 Font Editor

A wealth of applications with which you will need to mod Halo 2.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

H2 Font Editor

Post 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):
H2FontEdit.rar
H2Font Editor
(26.05 KiB) Downloaded 511 times
H2FontEdit-1.0 Source.rar
H2 Font Editor Source Code
(371.16 KiB) Downloaded 409 times
* 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:
H2FontViewer.rar
H2 Font Viewer
(11.76 KiB) Downloaded 449 times
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

Image

Image
Last edited by troymac1ure on Mon Jun 16, 2014 4:28 am, edited 8 times in total.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: H2 Font Editor

Post 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?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: H2 Font Editor

Post 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?
xxpenguinxx
Posts: 1974
Joined: Sun Jan 27, 2008 4:50 am

Re: H2 Font Editor

Post by xxpenguinxx »

Does the font image display in full size or does it scale to the font size ingame?

Looks sexy btw!
DemonicSandwich wrote:See that? You see that how it is highlighted down here but it's not highlighted right there? Ah, I guess that's what I get for pirating it.
In Soviet Russia, DS touches you. Say it again and I'll do more than touch. ~DS -Oh baby
A cat was licking itself to the sound of potato chips.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: H2 Font Editor

Post by XZodia »

@troy Does this mean your going to release your menu GUI editor soon? =)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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. :lol:

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 :o
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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).
supersniper
Posts: 25
Joined: Tue Jul 07, 2009 5:03 pm

Re: H2 Font Editor

Post by supersniper »

does anyone still have this?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: H2 Font Editor

Post by XZodia »

It should be on the ftp server
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: H2 Font Editor

Post by DoorM4n »

I seriously can't believe I missed this. Holy crap this is awesome!
Image
Remnant! We were the last stand.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: H2 Font Editor

Post by neodos »

Awesome work!

Is that a volkswagen logo? haha! interesting placeholder.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
supersniper
Posts: 25
Joined: Tue Jul 07, 2009 5:03 pm

Re: H2 Font Editor

Post 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.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: H2 Font Editor

Post by DoorM4n »

Yeah crashed on me when I opened. I'll do the registry trick.
Image
Remnant! We were the last stand.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
supersniper
Posts: 25
Joined: Tue Jul 07, 2009 5:03 pm

Re: H2 Font Editor

Post 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.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: H2 Font Editor

Post by XZodia »

Well you could break it up into the different languages, perhaps?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
supersniper
Posts: 25
Joined: Tue Jul 07, 2009 5:03 pm

Re: H2 Font Editor

Post 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.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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).
supersniper
Posts: 25
Joined: Tue Jul 07, 2009 5:03 pm

Re: H2 Font Editor

Post 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?
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: H2 Font Editor

Post 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. :roll:

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
Post Reply