Jump to content
XCOMUFO & Xenocide

This Font


Jezulkim

Recommended Posts

I am not sure. I have, in the past, attempted to access the original xcom font, but could not come up with the font. You can always tweak the ufo2000 ini file to see if you can come up with something. I do know that the font you are trying to get a hold of though, is from either biglets.dat or smallset.dat from your xcom's geodata folder.

 

There are options in the ini file such as default, xcom_small, and xcom_large. I doubt it will be the actual font, but you could always give it a try.

 

Just change this line:

 

consolefont = default

 

And if that doesn't do anything, you can try experimenting with these lines (change 0 to 1):

 

F_LARGEFONT = 0

F_SMALLFONT = 0

 

But to be honest, I think somebody hard coded, or de-hard coded if you will, the xcom fonts for special reasons. Possibly Serge was trying to further remove xcom propriety data. Although, that's just pure speculation.

 

Btw, font size can make fonts appear choppy if too big. This may be another factor since the size did appear to get slightly bigger than the old stable's version. You might have to tweak that as well while trying to find the font.

 

edit: odd enough, I found a second 'consolefont' flag underneath the login. Perhaps this is why I had failed attempts in the past.

Edited by Kratos
Link to comment
Share on other sites

I tried changing the consolefont setting, and it seems to do nothing. But the another console font (console_font_file?), it could change the font but not to the xcom font.

 

"F_SMALLFONT = 1" changes all the dialog fonts to the xcom font. If I remember correct, the old ufo2k versions (I don't remember how old) they had an option to use cyrillic letters for the console. And what's interesting is that the font looked like the small xcom font. I'm very sure that my copy of xcom doesn't and didn't have that kind of a font. So this means that either there's hidden fonts in the smallset.dat or it was a separate file that came with ufo2k.

Link to comment
Share on other sites

I found this in the 'datfile/fonts/' directory.

 

 

 

You might have to edit the makefile in the datfile directory, which would mean you would be forced to recompile the game. I think it is the unifont file that's conflicting here. The makefile demands it to be there:

 

# Stop if dat.exe from allegro-tools is missing
dat -a ../ufo2000.dat fonts/unifont_8x8.txt -t FONT
dat ../ufo2000.dat UNIFONT_8X8_TXT NAME=UNIFONT_8X8

 

As for 'console_font_file', does such a flag exist? You have a question mark by it in your post and I am unsure if you are implying that you don't know if it is an existing flag.

 

And my mistake on seeing an extra 'consolefont' flag. I must have been doing something to the file.

Link to comment
Share on other sites

Are you saying that I should remove those lines and compile? Well, I did it. But I've got a problem now, an error when trying to run the game. This happens also when I don't modify the makefile.

 

UFO2000 Error!
./init-scripts/main.lua:53: attempt to load local `fh'(a nil value)
stack traceback:
		  ./init-scripts/main.lua:53: in main chunk

Any ideas?

 

 

And I put a ? because I wasn't sure what you meant when you said "a second consolefont flag". I didn't understand you meant duplicate :)

But yes, it does exist. It's used to load a TrueType Font file.

Link to comment
Share on other sites

No, I am saying replacing the code will give you results. Never remove code unless you are for certain it is not needed, especially when a comment line says it's delicate. According to the error you received, from the main.lua line 53, it cannot find a file and is simply reporting to you it will not proceed without it. You need to edit it, not delete it.

 

Try editing the unifont_8x8.txt file. From what I understand, it is telling the game where to look for the font files. Backup this file and replace all the text with:

 

fonts/biglets.cyr
fonts/smallset.cyr

 

Note that this might not work, since I am unsure of what the hex numbers by the original code mean specifically. Most likely they are hard coded segments to determine what letter/number/symbol is. It may even result in a crash or keyboard input problems (ie: typing t and getting a).

Link to comment
Share on other sites

Ok. I got rid of the error now. And I edited unifont_8x8.txt file like you said, but it's still the same, no change.

 

EDIT: I see that my ufo2000.dat file is not updated. Could this be the problem?

Edited by Jezulkim
Link to comment
Share on other sites

I don't know about the ufo2000.dat simply because I cannot open it with any text editor. Can you? Where are you seeing it is out of date?

 

As for any more ideas...I really don't have many left. Of course, you could always dig in the fonts.cpp source file to see extensive information of what's processing in further detail. I did find out what all the ascii (not hex after al) numbers are for in the source file. It looks like I was right about the i/o specification. Perhaps check to see if the console font is even being checked for xcom fonts. My guess is that it's hard coded strictly for the free fonts in the console and the other places where you see xcom font (when having the xcom files in your ufo2000 folder) are being checked separately.

Edited by Kratos
Link to comment
Share on other sites

I don't know about the ufo2000.dat simply because I cannot open it with any text editor. Can you? Where are you seeing it is out of date?

 

What do you mean? It's not a text file. I looked at the last modified date and its was 2007 something. I thought it should be updated after compiling because the makefile in the datfile directory says "# Compile misc. resources (icons, color-palette...) into ufo2000.dat".

 

It's really a shame, that the xcom small font is not available for the console.. it's such a great font.

Link to comment
Share on other sites

I think we're looking in the wrong place. I hold my theory that somebody removed the hard code for the console font. Now that I have looked at the fonts.cpp file...I found this:

 

/** Creates a FONT structure to be ready for use. 
* @param data04 Original glyph data for cyrillic. Optional. NULL here disables cyrillic.
*/

Somebody added code to prevent cyrillic font.

 

NULL shows up in few ufo2000 specific code, which would explain why we can still receive cyrillic font when we have xcom propriety data.

 

There is a code line embedded on line 710 in fonts.cpp:

 

FONT *g_console_font = NULL;

This is my last theory in this mess. Once we remove the NULL for console font, this line of code, we should have access to cyrillic font, thus xcom font for the console.

 

However, before doing so...try reverting, or perhaps downloading the source again, any changes you could have made. This includes everything we have changed up until now. What we were messing with earlier was a quick hack to see if we can access the cyrillic fonts instead of the unifonts.

Edited by Kratos
Link to comment
Share on other sites

If I do that, it won't compile.

 

obj-win32/font.o(.text+0xf26):font.cpp: undefined reference to `g_console_font'
obj-win32/font.o(.text+0xf34):font.cpp: undefined reference to `g_console_font'
obj-win32/font.o(.text+0x106c):font.cpp: undefined reference to `g_console_font'
obj-win32/font.o(.text+0x10d2):font.cpp: undefined reference to `g_console_font'
obj-win32/main.o(.text+0x4b84):main.cpp: undefined reference to `g_console_font'
obj-win32/server_gui.o(.text+0x1d8d):server_gui.cpp: more undefined references to `g_console_font' follow
make: *** [ufo2000.exe] Error 1

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...