BMFont bug
I downloaded the font you used, but I haven't been able to reproduce the problem with the cropped characters. What settings are you using (font size, aliasing, etc)? Does the problem show up in the preview window?
I'll see if I can't implement the alpha channel output today as well. It shouldn't be that difficult.
About releasing the source code. Yes, I've been thinking about open sourcing the project, but I'm not ready to do that just yet. We'll see when that will be.
Besides I just let a guy have the source code for a small donation, thus it wouldn't be right to release the code for free so soon after. Though I did tell him that I had plans to open source it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
John B
If it is indeed the GDI that is outputting the characters cropped, then I may have to implement a work around for those cases.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
- The font list has been corrected. (e.g. Tahoma is now shown instead of Tahoma Bold)
- The output texture can be saved in both 8bit and 32bit TGAs. For 32bit TGAs the font data goes into the alpha channel and the color channels are set to white.
- The character spacing is now also adjustable. The spacing can be set to 0 to save space, or set to a larger number to minimize artifacts in texture filtering.
I'll come back with a fix for the cropping bug as soon as I can figure out what is happening.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I'm still getting the first or last column of pixels cut off some characters as shown in the original post. That sample was done with the BeinetCondensed font at a size of 24 and anti-aliasing set to 1. I'm using Windows XP with SP2.
If I use an anti-aliasing value of 2, then problem goes away. But then I get single pixel horizontal lines in characters like 'H' and 'F' appearing fuzzy from the anti-aliasing.
As you can see, there is no cropping error. I doubt it has anything to do with SP2, but who knows. Have you tried generating the font on another computer?
Anyway, you can use the font I generated if you wish. The files are here: bc.fnt, bc_00.tga.
Even more interesting is that it doesn't always crop the characters on the same side.
Even if I increased the size of the rectangle drawn to not crop the characters, I don't think it would provide a good result since the character spacing would still be irregular.
I'll see what I can do.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
It looks like when your font was generated the font is off by a half-pixel or so. Which is especially visible on the rectangles for the non-visible characters.
Maybe I can find a way to allow the user to adjust this offset manually.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I think you may have nailed the bug with this one. From what I read and understand of ClearType this is likely the cause of the cropped characters.
I'll have to experiment with this when I get home. I'll probably have to add a warning to turn off ClearType, if I can't find a way to turn it off automatically while drawing the characters in the texture. I hope there is at least a way to detect that ClearType is turned on.
In the meantime, maybe you can turn off ClearType when generating the font textures.
Regards,
Andreas
[Edited by - WitchLord on March 8, 2005 8:37:34 AM]
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game