New Horizon on 1/3/2006 at 04:19
Quote Posted by Crispy
Are the required characters particularly unusual? Or are we just talking about vowels with umlauts and that sort of thing?
Not incredibley strange. I'm not able to upload anything at the moment, but if you take a look in the T3/Content/Pctextures/fonts folder, you'll see the papyrus and vtcgoblinhand .dds files in there. Take a gander at those, they shouldn't be too difficult to reproduce. The very top line are custom symbols for xbox, but I just removed those in my custom Minimalist fonts. Since those symbols don't exist in Minimalist...the entire row just becomes zeros. Each line is separated by a -1 (minus one).
Crispy on 1/3/2006 at 08:31
I see... Doesn't look too complicated. The visual gap between each letter isn't consistent (sometimes it's 2 pixels, sometimes 3, sometimes something else), but possibly that would just be implicitly specified by the font itself anyway.
The format of the .cel files is a bit silly; why not use line breaks to denote... well, line breaks?! Still, assuming they used a tool to generate the font files, I guess the file format is pretty irrelevant.
Well, you've got me interested. I've realised that I can just use SDL ((
http://www.libsdl.org), a multimedia programming library that I'm quite familiar with) to take a font file and spit out a .cel file and a Windows bitmap (BMP) file without, in theory, too much effort. From there you could just open up the bitmap in Photoshop or whatever and save it to a DDS file. (I won't be making it save directly into DDS - being able to write the DDS format is WAY out of the necessary scope of the program. :))
I really should be doing maths revision... but this is far more interesting. :cheeky: ... :sweat:
New Horizon on 1/3/2006 at 14:18
Quote Posted by Crispy
I see... Doesn't look too complicated. The visual gap between each letter isn't consistent (sometimes it's 2 pixels, sometimes 3, sometimes something else), but possibly that would just be implicitly specified by the font itself anyway.
Yeah, the spacing of the originals were somewhat sketchy, but I just went with a standards 2pixels or 3pixels. Can't remember which one I settle one in the end though. I think 3.
Quote:
The format of the .cel files is a bit silly; why not use line breaks to denote... well, line breaks?! Still, assuming they used a tool to generate the font files, I guess the file format is pretty irrelevant.
Yes, it is quite silly. It was pretty easy to figure out thankfully. Although it has been awhile since I worked with it, so I'm hoping I've been 100% accurate.
Quote:
Well, you've got me interested. I've realised that I can just use SDL ((
http://www.libsdl.org), a multimedia programming library that I'm quite familiar with) to take a font file and spit out a .cel file and a Windows bitmap (BMP) file without, in theory, too much effort. From there you could just open up the bitmap in Photoshop or whatever and save it to a DDS file. (I won't be making it save directly into DDS - being able to write the DDS format is WAY out of the necessary scope of the program. :))
I really should be doing maths revision... but this is far more interesting. :cheeky: ... :sweat:
Thanks Crispy. It will be great to have a tool for this. :) It will really open up T3 to a variety of font styles in future FM's. I'll even be able to put proper fonts in the Minimalist Project now too.
I'll be here to help out with the testing process. Getting the fonts to work correctly was a struggle by hand, so hopefully this will make it a snap. :)
Crispy on 2/3/2006 at 12:19
Quote Posted by New Horizon
Yeah, the spacing of the originals were somewhat sketchy, but I just went with a standards 2pixels or 3pixels. Can't remember which one I settle one in the end though. I think 3.
I think it should be part of the font; they do specify the distance between glyphs, in general. We'll have to see if that does actually match up. (Incidentally, if anyone has the actual TTF or FON font files used - Papyrus and Goblin Hand VTC, from memory - then that would be really handy for testing, so I can make sure my program's output matches up perfectly with the stock T3 font textures.)
Quote Posted by New Horizon
Yes, it is quite silly. It was pretty easy to figure out thankfully. Although it has been awhile since I worked with it, so I'm hoping I've been 100% accurate.
What you've been saying seems to match up with reality so far. :)
Quote Posted by New Horizon
Thanks Crispy. It will be great to have a tool for this. :) It will really open up T3 to a variety of font styles in future FM's. I'll even be able to put proper fonts in the Minimalist Project now too.
I'll be here to help out with the testing process. Getting the fonts to work correctly was a struggle by hand, so hopefully this will make it a snap. :)
Well I'm just glad I've finally found something useful I can easily do for the community... my other programming project was way too complicated and ill thought-out, and I don't have the time and motivation to make decent FMs (nor to play them, really, which sucks :erg:), so this project is just about perfect for me. :cool:
Thanks for the offer of testing, rest assured I'm going to hold you to that. ;)
New Horizon on 2/3/2006 at 15:09
Hmmmm, I'm not sure if this is the correct Papyrus font, but I found it on a website. This seems to look pretty close. Might want to double check the net for more though, there are likely a few free versions. Hard to say which one they used.
(
http://www.top100-websites.com/fonts/index.html?cat=p&start=30)
Gestalt on 2/3/2006 at 15:41
Papyrus is included with MS Office and a few other Microsoft Products, which is probably how most people get it. As far as I know the official version is still a (
http://www.linotype.com/7-1085-7/papyrus.html) commercial typeface, so the font sites that have it up for download are sort of suspect legally.
Crispy on 3/3/2006 at 02:28
Thanks, both of you. It may not be strictly legal to download it, but hey, it's for a good cause and I promise to delete the font off my computer when I'm done using it for testing. :) So no harm will be done...
New Horizon on 3/3/2006 at 04:18
No worries, we won't tell on you Crispy. :)
Crispy on 3/3/2006 at 04:47
Heh. Turns out that the font library I'm using (FreeType) can't read that TTF file anyway, even though it can read other TTF files - and Windows renders all of them fine. Weird.
I went ahead and started on this, but I'm not sure that my understanding of the CEL format is quite right. Check this out: (I've added line breaks at appropriate points)
Quote:
1, 46
0, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 24, 24, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 18, -1
18, 0, 0, 0, 0, 0, 7, 7, 11, 18, 18, 20, 20, 7, 10, 10, 11, 18, 7, 11, 7, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 7, 7, 18, 18, 18, -1
The first number is probably a version number. The second one is the vertical height of each line of text, and after that it goes into listing widths of glyphs. 0 means the glyph isn't in the file. -1 means end of line.
The first line of glyphs checks out, but I just started going through the second line in order to figure out what the order of the font glyphs is so I can reproduce it, and it doesn't quite seem to match up.
The first glyph is fine (though why they have the less-than and greater-than symbols
twice in the file is beyond me). Then there are a whole bunch of skipped characters, and it looks like there's a space character of width 7 after that, but now we start getting into some difficulty. If we take the third character as being 7 pixels long as instructed, then the exclamation mark in the texture gets cut in half! Half of it is in the third non-skipped glyph of the line, and the other half is in the fourth...
If we assume that each skipped character actually causes us to move 1 pixel ahead, then there are 5 extra pixels to account for and it seems to line up okay-ish. But then there are over 20 skipped characters in a later line, and there's no 20-pixel gap in that position!
What gives?
New Horizon on 3/3/2006 at 05:17
Hmmm, not sure what is happening there. When I recreated the classic thief carleton font by hand, I had to use '0' as the very first number, otherwise, it wouldn't allign properly. I think this was because I completely removed the xbox buttons from the font and eliminated the top line...that number 1 may signify that they added an additional line to the font maps.
Here is my carleton font map at 1024 and the .cel file.
(
http://newhorizon.veledan.com/oldthief_font.jpg)
(
http://newhorizon.veledan.com/oldthief_font.cel)