Jump to content
Sign in to follow this  
Nyerguds

Westwood Font Editor

Recommended Posts

As some people probably already heard, I made a font editor to edit the font format in Command & Conquer 1. Well, happy coincidence, it turned out this works for a bunch of other games, including Dune II. But that's not all; while implementing some of the pre-Dune2 font formats on request of Tomsons23, one of my strongest supporters and researchers in this journey, I got a request (from FunkyFr3sh) to also implement Dune 2000 support.

Now, as people around here most probably already know, Dune 2000 was, in fact, not made by Westwood, and as a result, the font's internals were completely different from the Westwood formats. But we figured it out anyway :)


So, without further ado... the Westwood Font Editor:

Current version: 1.5.4 (21/12/2016)

fonteditor_18_paste.png

The project is built on the .Net framework v3.5
Its code is licensed under the WTFPL.

Download:
Downloads folder

Source code: (C#)
Sources folder

Original development thread: (at cncnet.org)
https://forums.cncnet.org/index.php?topic=6810.0

 

* * *

 

Note on Dune 2000 support:

The text encoding dropdown list has an extra "Dune 2000 text encoding" item at the bottom. The reason for this is that the font is strangely reordered.

Dune 2000 has a text encoding translation table called "FONT.BIN", apparently meant to line up the used special characters in the font without leaving gaps. (Though, strangely, this isn't used to optimize the font in any way.)

For example, if you need the character "ä", that's byte 0xE4 in the text encoding used by the game (Windows-1252; standard US / Western European). If you look on address 0xE4 in FONT.BIN, you'll see the value there is 0x80. This means that character "ä" is at index 0x80 (128) in the fonts.

So, in short: ä = 0xE4 ==> table index 0xE4 ==> value 0x80 => font index 0x80

(The editor actually does the reverse; going from font table index to character by looking up in which spot in the table each index value is, but you don't need to do that, since Dune 2000 text files are just in Windows-1252 encoding)


If you want to add fonts for a different text encoding to the game, I advise you to get rid of this whole nonsense by replacing FONT.BIN with a 256-byte file containing a simple sequence of bytes from 00 to FF, so each character simply gets mapped onto itself. This does require re-ordering all characters on the font to actually take their correct place... but I've already done that for you guys :)

Dune 2000 fixed fonts:
http://nyerguds.arsaneus-design.com/project_stuff/2016/WWFontEditor/resources/Dune2000FontsFixed.zip

 

* * *

 

Full list of supported types / games, as of v1.2.1:

WWFont v1:
-Wargame Construction Set
-A Nightmare On Elm Street
-DragonStrike
-Circuit's Edge

WWFont v2
-BattleTech The Crescent Hawk's Revenge
-Eye of the Beholder
-Eye of the Beholder II The Legend of Darkmoon

WWFont v3
-The Legend of Kyrandia
-Dune II
-Lands of Lore The Throne of Chaos
-The Legend of Kyrandia Hand of Fate
-The Legend of Kyrandia Malcolm's Revenge
-The Legend of Kyrandia Malcolm's Revenge Installer
-Command & Conquer
-Command & Conquer Installer
-Command & Conquer Red Alert
-Command & Conquer Red Alert Installer
-Lands of Lore Guardians of Destiny
-Lands of Lore Guardians of Destiny Installer
-Command & Conquer Sole Survivor
-Lands of Lore III

WWFont v4
-Tiberian Sun
-Tiberian Sun Installer
-Tiberian Sun Firestorm
-Tiberian Sun Firestorm Installer
-Lands of Lore III Installer

IGFont (Dune 2000 was made by Intelligent Games, not by Westwood)
-Dune 2000

Edited by Nyerguds
  • Upvote 3

Share this post


Link to post
Share on other sites

Small demonstration of edited Dune 2000 font:

dune2000_2016-12-01_19-58-26.png

Edited by Nyerguds
  • Upvote 1

Share this post


Link to post
Share on other sites

Awesome work. The user interface seems very pro! :)

So could it be used to other languages characters support?

Share this post


Link to post
Share on other sites

Whoops, forgot to update this topic with the latest version. Looks even more pro now. As the new preview shows (using the editor's own icon), you can paste images into it now :P

And, yes, special characters support for translations is the main purpose of the tool. It even has a text encodings selector (below the characters list) to easily adapt fonts to foreign text encodings :)

Edited by Nyerguds

Share this post


Link to post
Share on other sites

That looks pretty neat!

On 03/12/2016 at 3:37 PM, Nyerguds said:

IGFont (Dune 2000 was made by Intelligent Games, not by Westwood)

-Dune 2000

Interesting, I knew that about E:BFD, but not dune2k. If you don't mind going on a tangent here, do you have any experience with the E:BFD files? Do you know if there's any overlap in their practices, in particular any insights into their formats that could be useful in Emperor?

Share this post


Link to post
Share on other sites

Sorry, I never really looked into EBFD besides getting it to run as no-cd setup. I know it involved editing text config files to read all movies from hard disk, and those files were not ini files, which didn't look very Westwood to me, but that's really it. My knowledge kind of stops at the introduction of the third dimension :P 

  • Upvote 1

Share this post


Link to post
Share on other sites
46 minutes ago, Nyerguds said:

I created edited Dune 2000 fonts that can be expanded for language support:

I am wondering... It's possible to change the "mission accomplished" text when you win a mission?

Share this post


Link to post
Share on other sites
18 hours ago, Cm_blast said:

I am wondering... It's possible to change the "mission accomplished" text when you win a mission?

I believe that is a graphic, not text. If it is, the graphic could probably be changed with whatever you wanna put there.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...