View Full Version : Custom font issue
09-19-2010, 06:53 PM
I tried to change the game ui font to Arial (I prefer reading sans-serif font) so I created with fontgen.exe every size I found inside the assets001.zip and assets003.zip files (12, 16, 20, 24, 32, 40 ,48).
I put the files in the right locations (.fnt -> Assets/Fonts, .tga -> Assets/Textures/Fonts) and I started DC.
This is the result:
The "normal" font is showing right but the bigger one seems like it's misplaced.
I tried several other fonts but it happens almost every time even with different bugs.
Is there something I'm doing wrong?
I read in some thread that this may be dependant on my screen resolution (1680x1050) and how DC choose between the varios font sizes.
09-20-2010, 02:24 PM
It kind of looks like the game is mismatching the fnt with the tga files. The fnt files basically tells the game where exactly each letter is in the corresponding tga texture.
09-20-2010, 03:31 PM
Every time I tried a new font I started from scratch, removing every .fnt (Assets\Fonts), .tga (Assets\Textures\Fonts) and .ctx (C:\ProgramData\DinsCurse\Assets\Textures\Fonts)
May be there's a bug in fontgen.exe?
09-20-2010, 06:25 PM
Are you renaming them all to gentium stuff or are you changing the entries in systems.gdb to point to your new file names?
09-20-2010, 06:31 PM
Renaming them to GentiumXX.fnt/tga as I've tried before to change systems.gdb values and they didn't worked (may be I did something wrong? ;) )
EDIT: for example I created this file Assets\Database\arialfont.gdb
ArialFontSpawnSystem overrides SpawnSystem
and obviously it doesn't work... :p
09-20-2010, 07:02 PM
That's strange. When I do what I think you are saying, it works. Can you zip up your fonts/textures stuff and email it to me so I can see exactly what you are doing and test it here?
I just tried the rename everything to Gentium part.
09-20-2010, 08:28 PM
Shadow you have mail :p
09-21-2010, 11:47 AM
Shadow you have mail :p
I got it, I will try to look at it today.
09-22-2010, 02:08 PM
Ok after a couple of mail we solved my problem:
Ok, I think I know what is going wrong. In the bigger fonts it is running out of texture space. If you open up the larger fnt files, you will see that the lines at the bottom start just showing 0s, that's because it ran out of room. You need to make the textures bigger with another option. Here's the commands I used for the gentium font originally:
fontgen name Gentium size 12
fontgen name Gentium size 16
fontgen name Gentium size 20
fontgen name Gentium size 24
fontgen name Gentium size 28 textureSize 512
fontgen name Gentium size 32 textureSize 512
fontgen name Gentium size 36 textureSize 512
fontgen name Gentium size 40 textureSize 512
fontgen name Gentium size 48 textureSize 512
I think Arial is a larger font in general so you might have to make some of these a different texture size for Arial. The texture size has to be a power of 2 (256, 512, 1024, etc). It defaults to 256.
The last thing that remains unsolved: is there a way to change fonts without renaming the to gentiumXX but using gdb files?
vBulletin® v3.6.7, Copyright ©2000-2020, Jelsoft Enterprises Ltd.