Author Topic: Font Editing Tutorial  (Read 7202 times)

0 Members and 1 Guest are viewing this topic.

-GandalfTheGrey

  • Connétable
  • Squire
  • *
    • View Profile
  • Faction: Neutral
Font Editing Tutorial
« on: December 16, 2005, 11:20:31 PM »
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/

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • M&BWB
Font Editing Tutorial
« Reply #1 on: January 31, 2006, 03:36:23 AM »
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.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

-GandalfTheGrey

  • Connétable
  • Squire
  • *
    • View Profile
  • Faction: Neutral
Font Editing Tutorial
« Reply #2 on: January 31, 2006, 10:45:23 AM »
Thanks for that, Janus. I don't have Photoshop, so I couldn't write this easier way to do it. :wink:

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • M&BWB
Font Editing Tutorial
« Reply #3 on: January 31, 2006, 11:03:54 AM »
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.
 :)
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

-GandalfTheGrey

  • Connétable
  • Squire
  • *
    • View Profile
  • Faction: Neutral
Font Editing Tutorial
« Reply #4 on: January 31, 2006, 11:46:04 AM »
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 ?

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • M&BWB
Font Editing Tutorial
« Reply #5 on: January 31, 2006, 12:35:45 PM »
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.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • M&BWB
Font Editing Tutorial
« Reply #6 on: February 06, 2006, 10:03:01 AM »
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.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

lord_yig

  • Recruit
  • *
    • View Profile
Font Editing Tutorial
« Reply #7 on: February 06, 2006, 02:24:05 PM »
Nice tutorial -GandalfTheGrey.
And nice link Janus. Nice font collection they have.

EDIT : Here is another link for Fonts... Nice collections too.
http://fonts.lordkyl.net/

-GandalfTheGrey

  • Connétable
  • Squire
  • *
    • View Profile
  • Faction: Neutral
Font Editing Tutorial
« Reply #8 on: February 06, 2006, 03:02:15 PM »
I added the links on the first post, besides the site where I found ManuskriptGotisch, the font I use for HYW.
Thanks. :)

Amman de Stazia

  • Sergeant Knight at Arms
  • *
  • schizophrenic? There's three of us now!
    • View Profile
  • Faction: Neutral
Re: Font Editing Tutorial
« Reply #9 on: October 15, 2006, 04:03:25 AM »
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??
http://forums.taleworlds.net/index.php/topic,12250.msg208344.html#msg208344

Family IS more important than Mount and Blade. 

Family D'Stazia.  (A, K and S )

PS - this line plugs TPW - The Peninsular War mod.http://forums.taleworlds.net/index.php/topic,42454.0.html

Buxton

  • A Drop of Pure Britain
  • Grandmaster Knight
  • *
  • A boring lime green affair.
    • View Profile
    • Deviant page
  • Faction: Swadian
Re: Font Editing Tutorial
« Reply #10 on: May 10, 2007, 08:33:19 PM »
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'.

UV mapping tutorial
"Even from the smallest height, rock bottom is not a soft place to land."

Bascavia10

  • Sergeant at Arms
  • *
  • Ecce, homus, et videt!
    • View Profile
    • Warcraft II website
  • Faction: Bandit
Re: Font Editing Tutorial
« Reply #11 on: May 11, 2007, 06:47:58 PM »
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.
I´d prefer a hole in my T-shirt rather than a T-shirt in my hole.

Tooff

  • Sergeant at Arms
  • *
    • View Profile
Re: Font Editing Tutorial
« Reply #12 on: March 01, 2008, 11:30:03 PM »
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

Asher

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
Re: Font Editing Tutorial
« Reply #13 on: March 19, 2008, 04:01:32 AM »
Yep... looks scary if you ask me--thought it would be easy ;) what a place to try my luck out on some moddin' :(

robinnbastar

  • Recruit
  • *
    • View Profile
  • Faction: Swadian
Re: Font Editing Tutorial
« Reply #14 on: May 26, 2008, 08:36:49 AM »
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 :|)