Posted 01 March 2008 - 04:28 PM
Posted 01 March 2008 - 09:46 PM
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, 01 March 2008 - 10:02 PM.
Posted 02 March 2008 - 04:22 AM
"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.
Posted 02 March 2008 - 09:30 PM
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.
Posted 03 March 2008 - 02:23 PM
UFO2000 Error! ./init-scripts/main.lua:53: attempt to load local `fh'(a nil value) stack traceback: ./init-scripts/main.lua:53: in main chunkAny 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.
Posted 03 March 2008 - 04:00 PM
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:
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).
Posted 04 March 2008 - 08:14 AM
EDIT: I see that my ufo2000.dat file is not updated. Could this be the problem?
Edited by Jezulkim, 04 March 2008 - 08:20 AM.
Posted 05 March 2008 - 12:50 AM
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, 05 March 2008 - 01:05 AM.
Posted 05 March 2008 - 03:05 PM
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.
Posted 06 March 2008 - 02:07 AM
/** 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, 06 March 2008 - 02:12 AM.
Posted 06 March 2008 - 08:39 AM
FONT *g_console_font = NULL;
Posted 06 March 2008 - 11:46 AM
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
Posted 06 March 2008 - 07:03 PM
Posted 07 March 2008 - 04:11 AM