I've been working on converting a standard font (Open Sans) to a bitmap font to import in my game. I'm using the CBFG program for the conversion and it all works fine when implemented. But I'm having trouble with too much space between each character. Is it possible to decrease the distance between each character, even when not using a monospace font? I'm mostly just looking for the "optimal settings", or something like that.
I have included a screenshot of my current settings if that would help.
Speaking of fonts...
Moderator: Moderators
Speaking of fonts...
- Attachments
-
- font.png (78.8 KiB) Viewed 8873 times
Re: Speaking of fonts...
Hi Imerion,
Here are the steps you need to follow ..
- Export your font as BMP + Binary Font Data (DAT) from CBFG.
- Import the ExportedFont.bmp file to the BitmapFromFile component in FontBitmap.
- Configure the Font component to match your CBFG configuration.
- Import the FontData.dat file to the FontDataFile component.
- Trigger the FileAction ( Read FontDataFile ) component once*
*You can do this by selecting it and pressing F5.
The example should look like this after processing FontData.dat ..
Once you're done importing & processing FontData.dat, you can remove the CBFG group ( and rename the other components if you want ). And in case you're going to use many RenderText components, you might want to wrap the RenderCharExpression in a function.
If you have any questions, let me know.
K
Unfortunately there's no support for proportional fonts built-in ( i've requested this on May 7th, 2008 .. still waiting ). Personally i never use the RenderText component anymore ( for this reason among others ) .. but attached is a example that imports the FontData.dat file you can export from CBFG and uses it with the RenderText component ( Align = Center won't work properly though ).Imerion wrote:Is it possible to decrease the distance between each character, even when not using a monospace font?
Here are the steps you need to follow ..
- Export your font as BMP + Binary Font Data (DAT) from CBFG.
- Import the ExportedFont.bmp file to the BitmapFromFile component in FontBitmap.
- Configure the Font component to match your CBFG configuration.
- Import the FontData.dat file to the FontDataFile component.
- Trigger the FileAction ( Read FontDataFile ) component once*
*You can do this by selecting it and pressing F5.
The example should look like this after processing FontData.dat ..
Once you're done importing & processing FontData.dat, you can remove the CBFG group ( and rename the other components if you want ). And in case you're going to use many RenderText components, you might want to wrap the RenderCharExpression in a function.
If you have any questions, let me know.
K
- Attachments
-
- OpenSans.zgeproj
- (22.75 KiB) Downloaded 520 times