Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Nov 29, 2016 2:45 pm Post subject:
Westwood Font Editor
Subject description: for Dune 2, C&C1, RA1, TS, Dune 2000, RA2...
Since Siberian_GRemlin never actually released his font editor, and demand was growing from the community to have such a tool to allow more fan localisations of the older games, I thought, what the heck, I'll dive into it.
So I decided to make my own font editor in C#. With the help of the Chronoshift team (Omniblade, CCHyper & Tomsons26, anyway) I figured out the font format itself, and managed to write code to read it, write it and show it as image. Apparently this format is used for quite a bit more than C&C1 and RA1; we used fonts from Legend of Kyrandia as test material as well, and apparently this should support Dune II too. And we didn't stop there...
So, without further ado... the Westwood Font Editor:
Full list of supported types / games, as of v1.13.2:
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
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Wed Nov 30, 2016 11:18 pm Post subject:
Added (experimental) Dune 2000 support. Technically not a Westwood format though... and it shows. It's constructed completely differently. _________________ QUICK_EDIT
Really cool Nyerguds, that you made it that comprehensive and cover all those WW games font formats.
Does anyone know which font is used for which aspect in the game?
12metfnt.fnt
6point.fnt
8point.fnt
editfnt.fnt
grad6fnt.fnt
kia6pt.fnt
Is any of these fonts responsible for the 0-9 unit group numbers that you see inside the unit selection brackets?
Which palette do these fonts use normally?
The text shown in TS on the sidemenu also depends on the color for Neutral house, which is LightGrey.
By editing the font, could we change the color to one that isn't remapable? _________________ SHP Artist of Twisted Insurrection: Nod buildings
If you mean for TS(cause these font filenames haven't changed since TD) then
12metfnt is used for Options and Credits, options button and cash that is
6point was nowhere to be seen on the check i did when we were working out what uses what on the rapp chat
8point is used for Ready/On Hold text
editfnt despite its name is used for the version info that appears in the menu, and loading screen text and cameos
kia6pt is is tooltips
grad6fnt and 6point might be used somewhere, easiest to find out edit the font and place it in a ecache mix
The game init's both of them so they should be used somewhere
Lin Kuei Ominae wrote:
The text shown in TS on the sidemenu also depends on the color for Neutral house, which is LightGrey.
By editing the font, could we change the color to one that isn't remapable?
Maybe, you might need to know how the game internally sets the colors for a specific thing(like tooltips for example) tho _________________ Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1
Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Thu Dec 08, 2016 9:09 pm Post subject:
Released v1.4; the editor now finally has a preview pane. Also, I figured out that you can put stuff on the Windows clipboard in multiple types together, meaning copied content from the editor not only serves as input for the editor itself, now, but can also be pasted into any image editor.
MustaphaTR wrote:
So we can edit D2K font now, this may make me back to Turkish Translation i made but left unfinished. But i'm ill so i'm not sure if i'll have time.
If you want to get into that, be sure to read the note about Dune 2000 editing I added in the readme file. They did some strange reordering of special characters in that font, so the notes I made about it will make your life a lot easier if you're trying to add new ones _________________ QUICK_EDIT
Nice tool. In 12metfnt (TS), above 170 index, it shows different on the character and its image.
Those characters may not be needed, but is it showing correctly?
Can the tool support the TS pcx file of dlgsysi.pcx and dlgsysa.pcx? It is an indexed image. QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Fri Dec 09, 2016 11:06 am Post subject:
E1 Elite wrote:
Nice tool. In 12metfnt (TS), above 170 index, it shows different on the character and its image.
It's not "different". It's just "not implemented in the font". Westwood usually uses filler characters to represent symbols they didn't include because they didn't need them in the game, that's all. You will see the same thing in pretty much every font if you go below index 32 (the space character), which is why the editor is set to automatically select the space as first character; the stuff before it is generally not useful. But if you want to implement these missing characters above index 170... well, hey, guess what. You got a font editor; you can do that now. Go nuts
Also note that other fonts in there, like kia6pt.fnt, don't seem based on DOS-437, but on Windows-1252 ("Windows - Western Europe" in the dropdown). That's what that dropdown is made for; it allows the grid to show characters from any supported encoding, so you can make sure the font matches it.
Note: I define "supported encoding" in my editor as "one byte per character, extended ascii", so encodings that use multiple bytes (like UTF8/UTF16) or in which the first 128 characters do not match plain ASCII (like EBCDIC), are deemed incompatible, and are left out of the dropdown.
E1 Elite wrote:
Can the tool support the TS pcx file of dlgsysi.pcx and dlgsysa.pcx? It is an indexed image.
The goal of this editor is to support a previously uneditable format, not to make a UI for editing fonts. Even if I'd make a kind of image import function, it'd only be to save it as .fnt file, not as pcx. If you got fonts that are already in known editable image formats... just edit them in an image editor.
MustaphaTR wrote:
I edited the font and started to translation. What i did was to replace some character that i won't use and use those actual letters on the .uib file. It wouldn't be a problem as each language their own font file and it works.
There should really be no need for that... if you just rewrite font.bin as described in the readme, you can use any text encoding you want in the font itself without needing to do weird stuff with your text. _________________ QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Fri Dec 09, 2016 11:57 pm Post subject:
Released v1.5:
-Implemented font type conversion.
-Added global color replace function.
-Ctrl + arrow keys serve as shortcuts for image shifting.
-Ctrl + Shift + arrow keys will shift all images in the font.
-The preview image can now be copied to the clipboard with a right-click menu.
-Images can now be pasted from the clipboard. They'll adapt to the currently loaded palette. Below is a little test done by copying the editor's own icon.
[edit]
Released 1.5.1, to address a small but annoying bug where the new "paste-from-image" logic caused the original font data paste to no longer be used, causing an unnecessary data loss potential.
[edit again]
Released 1.5.2, with some much-needed close-confirmations, a "Save As" menu that finally allows you to change the save type (though given the touchups that usually requires it's advised to do this in the editor anyway), and command line argument support for opening files.
fonteditor_18_paste.png
Description:
A little test done by copying the editor's own icon into the editor.
Filesize:
38.52 KB
Viewed:
6293 Time(s)
_________________ Last edited by Nyerguds on Tue Mar 22, 2022 1:53 pm; edited 2 times in total QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Wed Dec 21, 2016 1:46 pm Post subject:
Okay.... I wondered why changing palette colours sometimes seemed to remove any image data that was in the clipboard. Turns out some clown at Microsoft added the "feature" during the Vista development that double-clicking a label that contains text copies that text to the clipboard
So that "T" on the first palette colour that indicates transparency? Yeah, that replaced the image data I was working with
Thankfully, I found a fix. So, now there's v1.5.4. _________________ QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue May 23, 2017 7:20 pm Post subject:
Welp, been a while since I added any updates in here.
Newest developments:
v1.5.5: (2017/04/08 14:24)
-Copying a symbol to the clipboard now also sets it in the clipboard as text.
v1.5.6: (2017/04/08 15:28)
-Fixed the fact changing the Y-offset didn't refresh the characters grid.
v1.5.7: (2017/04/08 19:40)
-Fixed a crash in the previewer when one of the previewed characters is the last character in the font.
v1.5.8: (2017/04/09 00:30)
-Fixed a bug in the font size changing that made it change the wrong dimension.
-Fixed assembly name; it was still "CnCFontEditor".
v1.5.9: (2017/04/09 12:49)
-Added shortcuts for bulk shifting without data loss and Y-offset changes.
-Holding down Ctrl now enables colour picker mode, for fast colour picking.
-Optimized refreshing of paint mode and colour pick mode.
-Colour picker now shows a hand cursor.
v1.6: (2017/04/11 08:30)
-Added option for limiting 8-bit font types to use only 16 colours.
v1.6.1: (2017/04/17 11:06)
-Shifting shortcuts no longer work from text fields or the characters list.
-Added better close confirmations, with prompt to save.
v1.7: (2017/04/21 17:02)
-Edited 16-colour palettes can now be saved using a new palette manager.
v1.7.1: (2017/05/23 18:40)
-Added new "Paste on symbol" option (Ctrl+Shift+V) that pastes with transparency. This can be used to easily copy diacritics. _________________ QUICK_EDIT
I come from China, is a fan of command and conquer
Thank you for making the 1.06 patch.
When I saw WWFontEditor, translation commands and conquests made it possible.
I use the phrase to replace ascii, the interface is completed,
But when I modified grad6chi.fnt for missionini_briefings, I got an error
If grad6chi.ini exceeds 33k, WWFontEditor can not open it.
Thanks again for your contribution to command and conquer
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Aug 07, 2018 2:46 pm Post subject:
Yeah, the addressing using signed Int16 was a bug; it should be unsigned Int16. That issue got fixed (thanks to yjfyeyu), so now the fonts should be able to address symbols up to 64k. _________________ QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Mar 19, 2019 3:12 pm Post subject:
I added support for the RA2 fonts.
It's still fairly experimental (hasn't been tested in the game), but it's in there.
I will probably add some more options to it eventually, like TTF font import (a feature which PD's OS Font Editor has), and changing the first font range (0000-00FF) to show up as Windows-1252 rather than ISO-8859-1, because Westwood is weird and doesn't use Unicode as it should be used.
Note that unlike OS Font Editor, my tool does not keep track of the original font internals, which has the side effect that the step to optimise the font symbols (to remove duplicate images) can take about 20 seconds. On the plus side... it actually optimises the symbols, which OS Font Editor does not do. _________________ QUICK_EDIT
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Wed Apr 08, 2020 3:50 pm Post subject:
Small update on this... thanks to a bug report from yjfyeyu, I fixed a bunch of issues with multithreading in this tool.
You can now close the tool and save the opened font file in the "save unsaved changes" warning which appears, an action that apparently caused a crash before due to it trying to disable the UI as part of the saving process while simultaneously closing the window. _________________ QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum