OMG, I totally forgot about this fellow and his font creation tool! Forget about the hackish mess I wrote above, have a look a Haem's Font creator to roll your own IE bitmap fonts:
http://www.shsforums...onts-for-pt-pl/
Corvias
Member Since 23 Mar 2006Offline Last Active Jan 27 2017 11:00 PM
Community Stats
- Group Member
- Active Posts 36
- Profile Views 7434
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
User Tools
Friends
Corvias hasn't added any friends yet.
Latest Visitors
Posts I've Made
In Topic: Bigger fonts for BGII:TOB and other IE games
29 February 2012 - 01:46 PM
In Topic: Bigger fonts for BGII:TOB and other IE games
28 February 2012 - 06:53 AM
Ugh. So I've had no luck finding my templates and scripts for this mod on any of my machines or VM's. I know I had backed that stuff up, but I think I must have deleted the backup at some point before my HD crash. There's one other place I can check, but it will have to wait until tonight. All is not lost, though as I remember most of the process, which I will share with you here in case someone wants to recreate what I have done. Keep in mind, that this is totally off the top of my head, so you will have to do some filling in of numerous blanks. You will probably not get this right the first time, so when something is messed up, examine your work and try to figure out what is defferent between your font, and the default one that comes with the game. Okay, here we go:
Things you'll need:
- Codehead's Bitmap Font Generator
- Adobe Photoshop (or some other image app that can do batch automation/slices.
- BAMworkshop 1 & 2 (I can't remember why, but I needed both for some reason)
- Optional, but highly recommended if you have the skill - AutoIT or some other script language to let you automate some of the very repetetive processes you have to do to make a font for IE games.
- Infinite quantities of patience
1. Open up the default BG2 font, Normal.bam, and have a look at how it is structured. As you can see, an infinity engine font is an animation that contains 256, one-frame sequences. To begin, you should create a new bam, and create the 256 empty sequences. You can do this by hand, or record a mouse-movement script with AutoIt to make it less painful. (that isn't even the most tedious part!)
2. Fire up Codeheads bitmap font generator. Set the background color to RGB 0,128,128. Can't remember if the forground color was important. I don't think it matters. Look at my fonts and the default BG2 ones and follow your gut. Set the Texture size to 512x512. You will want to want to tweak the X and Y offset so that the characters are roughly centered in each of their respective boxes. From there, set your preferred font and various options (size, bold, italic, etc). I recomend turning of anti-aliasing. Export the bitmap and save it someplace.
3. Open up photoshop and load up the bitmap you created in CBFG. Here's where my memory starts to get really fuzzy. I think you have to convert the file into a .bmp and create a custom palate of two colors - one being that teal color mentioned above and the other a salmon/pink color. Can't remember if that was necessary for the resulting bam to work, though. You also need to slice the image up so that each character is its own bmp file. There's tools in photoshop to make that very quick, if I recall.
4. Once you have your bazillion character images, you need to create an automated workflow (can't remember the exact name) in photoshop that should do three things to each image:
- Apply that two-color custom palate
- Auto-crop the extra space around the character
- Save the file as a .bmp
5. Still with me? good - the fun is just beginning! Now fire up BAM workshop again and open up the empty bam you created earlier with the 256 empty sequences. You need to load each one of the character images into its own sequence AND you need to make sure its the right one, so compare what you are doing to an existing font. If I recall, the first few frames are just blank padding. I think the first two did something important like determine the line spacing. Can't remember. Look at my work and the default font. Experiment. I had this step successfully automated with AutoIT.
6. At this point you should have a bam file which can be loaded into the game, but if you do, it will look like gibberish. The last and most tedious step is that you have to adjust the vertical and horizontal offset of each frame in BAMworkshop. The best part? you can't automate this step - it pretty much has to be done by hand because what the offset should be for each character depends on the size of the font you've used. I recommond that you pick a common letter, like lowercase "a" and see if you can find the right values for it. If your font is a similar size as mine, look at the values I've used - they should be pretty close. Once you've found decent values for "a", you can usually safely set other similarly shaped caracters the same value. Then choose a common uppercase letter, find the best values, and set the other similarly shaped chars the same. Rinse, wash, repeat. This is the longest step in the process. Incidently, you can use this step to fix any issues with non-english characters in my fonts that I neglected to align (like accented vowels, etc.)
So there you go. Hopefully that's enought to get you on your way. Now do you see why it takes me so damn long to do one of these fonts? I hope someone out there with more coding experience than me can find a wau to automate this more. Though personally, I'll be looking at the feasability of using GemRB for any future playthroughs of the BG series.
Things you'll need:
- Codehead's Bitmap Font Generator
- Adobe Photoshop (or some other image app that can do batch automation/slices.
- BAMworkshop 1 & 2 (I can't remember why, but I needed both for some reason)
- Optional, but highly recommended if you have the skill - AutoIT or some other script language to let you automate some of the very repetetive processes you have to do to make a font for IE games.
- Infinite quantities of patience
1. Open up the default BG2 font, Normal.bam, and have a look at how it is structured. As you can see, an infinity engine font is an animation that contains 256, one-frame sequences. To begin, you should create a new bam, and create the 256 empty sequences. You can do this by hand, or record a mouse-movement script with AutoIt to make it less painful. (that isn't even the most tedious part!)
2. Fire up Codeheads bitmap font generator. Set the background color to RGB 0,128,128. Can't remember if the forground color was important. I don't think it matters. Look at my fonts and the default BG2 ones and follow your gut. Set the Texture size to 512x512. You will want to want to tweak the X and Y offset so that the characters are roughly centered in each of their respective boxes. From there, set your preferred font and various options (size, bold, italic, etc). I recomend turning of anti-aliasing. Export the bitmap and save it someplace.
3. Open up photoshop and load up the bitmap you created in CBFG. Here's where my memory starts to get really fuzzy. I think you have to convert the file into a .bmp and create a custom palate of two colors - one being that teal color mentioned above and the other a salmon/pink color. Can't remember if that was necessary for the resulting bam to work, though. You also need to slice the image up so that each character is its own bmp file. There's tools in photoshop to make that very quick, if I recall.
4. Once you have your bazillion character images, you need to create an automated workflow (can't remember the exact name) in photoshop that should do three things to each image:
- Apply that two-color custom palate
- Auto-crop the extra space around the character
- Save the file as a .bmp
5. Still with me? good - the fun is just beginning! Now fire up BAM workshop again and open up the empty bam you created earlier with the 256 empty sequences. You need to load each one of the character images into its own sequence AND you need to make sure its the right one, so compare what you are doing to an existing font. If I recall, the first few frames are just blank padding. I think the first two did something important like determine the line spacing. Can't remember. Look at my work and the default font. Experiment. I had this step successfully automated with AutoIT.
6. At this point you should have a bam file which can be loaded into the game, but if you do, it will look like gibberish. The last and most tedious step is that you have to adjust the vertical and horizontal offset of each frame in BAMworkshop. The best part? you can't automate this step - it pretty much has to be done by hand because what the offset should be for each character depends on the size of the font you've used. I recommond that you pick a common letter, like lowercase "a" and see if you can find the right values for it. If your font is a similar size as mine, look at the values I've used - they should be pretty close. Once you've found decent values for "a", you can usually safely set other similarly shaped caracters the same value. Then choose a common uppercase letter, find the best values, and set the other similarly shaped chars the same. Rinse, wash, repeat. This is the longest step in the process. Incidently, you can use this step to fix any issues with non-english characters in my fonts that I neglected to align (like accented vowels, etc.)
So there you go. Hopefully that's enought to get you on your way. Now do you see why it takes me so damn long to do one of these fonts? I hope someone out there with more coding experience than me can find a wau to automate this more. Though personally, I'll be looking at the feasability of using GemRB for any future playthroughs of the BG series.
In Topic: Bigger fonts for BGII:TOB and other IE games
27 February 2012 - 08:03 PM
Hi folks, sorry for the delay! I had a catastrophic HD crash, and I lost some of the templates and automation scripts I had written to finish the next version. That was a few months ago, and afterwards that sort of took the wind out of my sails. I think I have backups of some bits on a VM on one of my computers, but unfortunately real life is setting my priorities. I promise that I will share what I recover, so someone with more time can pick up where I left off. Again, my deepest apologies for not notifying the community sooner.
In the meantime, check out GemRB -- it has a plugin which supports resizable true-type fonts (thus negating the need for this mod).
In the meantime, check out GemRB -- it has a plugin which supports resizable true-type fonts (thus negating the need for this mod).
- Spellhold Studios
- → Viewing Profile: Posts: Corvias
- Guidelines