Font Editing Tutorial

Users who are viewing this thread

What you need :
-LMNOpc Bitmap Font Builder ;
-DXTBmp ;
-An image editing program such as Photoshop ;
-Your hands.

How to 'extract' the font from comic_sans.tga (Warning : I don't know why and how it worked for me. If it doesn't for you, download this) :
(Optional)
-Use Photoshop to open comic_sans.tga (I use Adobe Photoshop Elements 2.0).
-Save with Photoshop as TGA, under another name.
-Open the new file with DXTBmp.
-Look at its Alpha channel, it's the font used in Mount&Blade.
-Open it, edit it manually and make the changes you want.
Or you can simply make your own font, and check with the vanilla one if the letters are well placed and not too wide.

How to make your own font :
-Open LMNOpc Bitmap Font Builder.
-Choose the font you want in Font 1.
-Align on the left. Pic.
-Select 1024x1024 for Texture Size. Pic.
-Select Background = black, Foreground = white.
-You can also reduce or enlarge the font size, useful if your font is pretty wide. Pic.
-In the Character Set tab, choose NeHe Two-Font Texture (32-159 x2). Pic.
-The font in Font 2 doesn't matter.
-Save as BMP or 24-bit TGA (RGB), as you wish.
-Edit this BMP or TGA if your characters are wider than the vanilla ones, in order to avoid this.

How to add your font to the game :
-Create a blank 1024x1024 image, with Photoshop or Paint.
-Open it with DXTBmp and add your font in the Alpha channel.
-Save as Targa with Alpha.
-Replace the vanilla comic_sans.tga by yours, which you must name comic_sans.tga, of course.

Links for fonts (thanks to Janus & lord_yig) :
http://dafont.com/
http://www.typenow.net/themed.htm
http://fonts.lordkyl.net/
 
Just now had a chance to try this, and I must say, nice tutorial.

An additional note though, you shouldn't need to use DXTBmp if you have Photoshop. The way I did that second part:
Open comic_sans.tga and the file created by LMNOpc both in Photshop.
With the created file, choose Select->All, then Edit->Copy.
Switch to the comic_sans.tga file.
In the bottom right there are Layers, Channels, and Paths buttons; choose Channels.
Optional: Click the little box next to Alpha 1 to make it visible. You should now see white letters with a pink outline. Click the same box next to RGB to hide the color channels; you should now only see the Alpha channel, white text on black background. Now you see what the text will look like.
You'll notice the names of the RGB color channels are highlighted in blue while the Alpha 1 channel is not. Click on the text Alpha 1 so that it is selected, and the color channels are not. You must do this so the pasted image will go into the Alpha channel rather than RGB.
Now Edit->Paste to paste the other image into the alpha channel. You should see your new font now.
Simply save the comic_sans.tga file. That's it.
 
It really is a pain getting the font widths correct so they look right, eh?
I'm debating between stretching the font I want to use to fit the correct character widths, or waiting until the font1.txt file can be module-separated so I can specify the correct character widths. Hopefully the upcoming M&B version will include that.
:smile:
 
Have you tried to edit font1.txt yet ? Saying that it's a pain in the ass is really an euphemism, streching the letters is far easier. :???:

Just out of curiosity, what font are you implementing ? Is is for Age of Ash ?
 
I've looked at font1.txt and understand it's layout. It simply defines how many pixels wide each character is from the left. Of course that will take a character by character definition, but that's OK. A better solution in my opinion than stretching the characters in the TGA and making them look too thin/wide for the font.
Yep, it's for Age of Ash. I'm currently playing with "Toxica" font.
 
Anyone interested in setting up a custom font for their mod, check out this link.
http://www.typenow.net/themed.htm

They have free downloads of various TV/movie, game, and musical group fonts.
 
Hi guys - good tutorial...  Does anyone know how I can alter the default text colour?  I want dark backgrounds in my dialogue screens, so I need a paler text - any ideas??
 
Sorry to revive a dead topic, but does this actually still work in 0.808? I can't seem to locate the 'comic_sans.tga'.
 
Mount&Blade/textures.

However, it seems this editor isn't working and now you have to edit Mount&Blade/data/fond_data.xml. This is rather difficult but i believed there was a tutorial for this. However it was an rather difficult one.
 
This topic is dead? anyway , how about version 903, looks like they`re using font.dds and it`s different.
Link for many types of fonts:
http://www.dafont.com
 
Yep... looks scary if you ask me--thought it would be easy :wink: what a place to try my luck out on some moddin' :sad:
 
does any of you have the idea how to change in 0.903 because this tutorial is useless now with new font.dss(what can i use to open dss file :neutral:)
 
can someone explain how i can do this to make have smaller font text?  i'd like to keep casualty report in battle but make it less intrusive to the combat.
 
I searched the forums extensively, and probably asked somewhere before and missed the answer... I've seen some screencaps where town names on the worldmap are outlined in a different color. How?
 
minmaster said:
can someone explain how i can do this to make have smaller font text?  i'd like to keep casualty report in battle but make it less intrusive to the combat.


Sorry for the delay of the Reply, I suppose that this topic is not really dead, so here is my small tutorial:



1. Open Mount&Blade folder, by default [C:\program files\Mount&Blade\]

2. Enter in the \Data folder.

3. Open "font_data.xml" with notepad.

4. Locate the font_size="70" string

5. Replace "70" by:

To make the font smaller make the value bigger: eg 120
To make the font bigger make the value bigger: eg 40



If you want to change the font type, you can use my program Font Customiser
 
Back
Top Bottom