View Full Version : Fonts
Feuer Frei!
08-03-13, 08:38 AM
If wanting to edit fonts, and correct me if i'm wrong but as far as i understand it the off file contains the rectangles for the same-named dds file, which then the dds calls from to render the font ingame.
Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.
Easier to use an existing off file to edit than creating a new font set.
Can someone enlighten me please as to why silent 3ditor is having black screen issues in the viwer window when opening off files, and also what is the easiest way to edit a existing font.
Considering utilizing an exising off is quicker?
If wanting to edit fonts, and correct me if i'm wrong but as far as i understand it the off file contains the rectangles for the same-named dds file, which then the dds calls from to render the font ingame.
Exact, off files define pixels in the dds file of the same name which correspond to each character. The arguments of each entry are:
Horizontal / Vertical spacing: not 100% sure about it, but I think this is the number of pixels that the game will space out fonts of in game (both can be set to 0 if the correct spacing is already included in the font definition, i.e. blank pixels in the dds file);
Character: the character defined;
X/Y: horizontal/vertical offset in pixels from the top left corner;
Width/Height: quite self-explanatory :03:
You can add or delete as many font definition entries as you want.
Also note that most fonts are also set through an homonymous txt file, which specifies:
number of character definitions contained in the file;
width/height in pixels of the source dds;
character definitions including:
- set character;
- character ASCII number;
- left/top/right/bottom offsets relatice to the dds file, defining the position and size of each character.
As you can see, there is a lot of redundant information, which makes me to wonder whether both the txt and off files are required or not :hmmm:
Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.
Probably a missing feature: I have tried opening SHIII fonts (which are in tga format), but with the same result. :yep:
Easier to use an existing off file to edit than creating a new font set.
Probably yes, if your manage to find a stock font which is similar to the one you want to add to the game. If not, font spacing will be messed up, with some fonts having a bigger spacing than other ones.
If, on the other hand, you decide to create a new font definition from scratch, you should measure pixel offsets manually, and enter them in the off/txt files. The best method to do it may vary though, depending on the photo editing program you are going to use. In general using the grid and the "sticky" guides featured by photoshop and similar programs, could ease up your work a lot :)
P.S: I have quite a good collection of fraktur fonts on my hard drive. Let me know if you need for them :salute:
volodya61
08-03-13, 01:04 PM
..P.S: I have quite a good collection of fraktur fonts on my hard drive. Let me know if you need for them :salute:
Guys, don't forget about Cyrillic symbols also, please.. so wont happen the same as in Parts Magui :03:
SkyBaron
08-03-13, 02:44 PM
Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.
I had to create monospaced fonts for the Enigma mod I'm working on, and I had the same issue. I solved the problem by editing the fonts on an old PC running Windows XP. Don't know if it was because of Windows 7 or my graphic card's driver, or a combination of both.
Feuer Frei!
08-03-13, 07:02 PM
Thank you for the replies Gents.
So, i tinkered with changing a font style yesterday, the load\save game screen and edited the page chooseloadsave file, example:
[G56 I4]
Name=SaveGame Button
Type=1032;Button
ItemID=0x56010001
ParentID=0x56010000
Pos=0,-218,300,36
Zone= 362 384 300 36 3 1 0x56010007 0.5 -1 0x56010001 -0.5 0 0 0
Color=0xFFFFFFFF
Materials=4
Display=0;No stretch
Font=10 <<<<<changed this to another number, according to menu.ini file
Text=3502 <<<<<< i assume this is the position of text on screen???
TextFlags=0x5
StatesColors=0x8B8989FF, 0xEBCF99FF, 0xDD5800FF, 0xDD5800FF
However, no change appeared ingame?
What exactly do i need to edit\change etc to get a different font appear in say, this particular screen?
If i want to introduce a new font, what file do i need to edit? The off file only or the off file and the tga file?
Obviously i need to add the new font to the menu ini file which is easy.
A step-by-step guide would be good\helpful.
PS: I use Gimp as my image editor.
Thank you.
divingbluefrog
08-04-13, 01:44 AM
Text=3502 <<<<<< i assume this is the position of text on screen???
No, it's not. It's the entry 3502 = SAVE GAME text in the \Silent Hunter 5\data\Menu\menu.txt file.
Position on page is given by Pos= and zone= lines above.
What exactly do i need to edit\change etc to get a different font appear in say, this particular screen?
I think everything gets much more intuitive when you edit game menues using the inbuildt Menu Editor.
A bit of theory about menu ini format (esp. object resizing and placing):
http://www.subsim.com/radioroom/showthread.php?p=496713#post496713
A couple of good Menu Editor tutorials:
http://www.subsim.com/radioroom/showthread.php?p=1292498#post1292498
http://www.subsim.com/radioroom/showthread.php?p=1330634#post1330634
If i want to introduce a new font, what file do i need to edit? The off file only or the off file and the tga file?
Obviously i need to add the new font to the menu ini file which is easy.
A step-by-step guide would be good\helpful.
You better start from a stock font.
You need to redo the alpha channel of its tga/dds file (RGB channel only used for font color). Editing off and/or txt files is only needed if you need to add new characters (cyrillic for instance) and/or if character spacing for the new font doesn't match you stock template. :yep:
Feuer Frei!
08-04-13, 07:11 AM
@gap
thanks very much for your informative post.
It will get me started in the right direction :salute:
@gap
thanks very much for your informative post.
It will get me started in the right direction :salute:
My pleasure. :)
Please note that the first tutorial I have linked in my previous post is relative to SHIV, but it still applies to SH5. In that respect, the only diffrence between the two games is the presence of a Menu Editor in the latter.
Let me know if you need for any further assistance :salute:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.