Hi everybody,
I just built the latest trunk version and tried to run it, but there seems to be a problem with the fonts because no text is shown in the main menu. When I start a new sp campaign, the game crashes. Stderr states that the DejaVu fonts could not be selected, however I did download and install those fonts. I'm running Win Vista x64 and used VS 2008 to compile the sources. I also tried some older revisions of Trunk but had the same problem.
Seems like I have the same problem as mentioned here: viewtopic.php?f=6&t=718&hilit=font+trun ... =75#p12122 which was quite a while ago. According to the linked thread, the whole thing is a problem with the fontconfig library used by QuesoGLC. I don't have a clue what to do about it, though.
Any hints on what to do would be much appreciated
Font Problems with Trunk on Win Vista + VS2008
Re: Font Problems with Trunk on Win Vista + VS2008
Install the dll's and the required directories from the dev package.Fred wrote:Hi everybody,
I just built the latest trunk version and tried to run it, but there seems to be a problem with the fonts because no text is shown in the main menu. When I start a new sp campaign, the game crashes. Stderr states that the DejaVu fonts could not be selected, however I did download and install those fonts. I'm running Win Vista x64 and used VS 2008 to compile the sources. I also tried some older revisions of Trunk but had the same problem.
Seems like I have the same problem as mentioned here: viewtopic.php?f=6&t=718&hilit=font+trun ... =75#p12122 which was quite a while ago. According to the linked thread, the whole thing is a problem with the fontconfig library used by QuesoGLC. I don't have a clue what to do about it, though.
Any hints on what to do would be much appreciated
You need to copy over /etc into the location where warzone2100.exe (and the .dlls) are.
and it ends here.
Re: Font Problems with Trunk on Win Vista + VS2008
Out of curiosity, before you apply Buginator's solution, what happens if you just copy the "font" directory from the devpkg over to the directory where "warzone2100.exe" appears? I would be interested to know if that were enough to fix it.
Re: Font Problems with Trunk on Win Vista + VS2008
you don't get any fontsZarel wrote:Out of curiosity, before you apply Buginator's solution, what happens if you just copy the "font" directory from the devpkg over to the directory where "warzone2100.exe" appears? I would be interested to know if that were enough to fix it.
Re: Font Problems with Trunk on Win Vista + VS2008
Thanks Buginator and Zarel, I copied the "font" directory over to the directory of the executable and everything was fine. Everything else form "devpkg\data\" was already there, although I don't how it got there since I did not copy it manually.
I see from the "Warzone2100" project inside the solution that there is a post build event which is supposed to copy over the whole "data" directory from the devpackage.
When I deleted all the .dll files and "font" and "etc" directories and rebuilt the whole solution, this event was not executed however, and none of the .dll files or directories showed up. I can only guess that one of the older revisions I compiled had a working post build event that somehow excluded the "font" directory. Seems rather strange to me, but maybe this makes sense to you.
I see from the "Warzone2100" project inside the solution that there is a post build event which is supposed to copy over the whole "data" directory from the devpackage.
When I deleted all the .dll files and "font" and "etc" directories and rebuilt the whole solution, this event was not executed however, and none of the .dll files or directories showed up. I can only guess that one of the older revisions I compiled had a working post build event that somehow excluded the "font" directory. Seems rather strange to me, but maybe this makes sense to you.
Re: Font Problems with Trunk on Win Vista + VS2008
Erm... lets clear this up.
To clarify, in the directory where warzone2100.exe (or warzone2100-dbg.exe) is, you have all the .dlls, and you also have a folder called etc/fonts correct?
For MSVC people, because of the libs we are using, it expects to find the font.conf file in etc/fonts... without having etc/fonts, then you will see a blank screen, since it didn't locate the fonts.
For minGW people, the libs are newer, and the 'fixed' lib is being used.
To clarify, in the directory where warzone2100.exe (or warzone2100-dbg.exe) is, you have all the .dlls, and you also have a folder called etc/fonts correct?
For MSVC people, because of the libs we are using, it expects to find the font.conf file in etc/fonts... without having etc/fonts, then you will see a blank screen, since it didn't locate the fonts.
For minGW people, the libs are newer, and the 'fixed' lib is being used.
and it ends here.
Re: Font Problems with Trunk on Win Vista + VS2008
That's correct, but this folder was never missing.Buginator wrote:To clarify, in the directory where warzone2100.exe (or warzone2100-dbg.exe) is, you have all the .dlls, and you also have a folder called etc/fonts correct?
My problem was solved by copying "devpkg\data\fonts\" (which contains the actual .ttf font files) into the folder where warzone2100.exe is, meaning that "etc" and "fonts" are both at the same directory level.
Before posting on the forum, I tried to copy the .ttf files (which I downloaded from the net) myself to "etc/fonts" but that didn't help. I didn't know that the devpackage does also contain all the runtime dependencies.
Hope things are clear now, sorry for causing the confusion.
Re: Font Problems with Trunk on Win Vista + VS2008
From the dev package,
http://sourceforge.net/projects/warzone ... z/download for 2.3
http://sourceforge.net/projects/warzone ... z/download for trunk
you copy from the dev package "data" into your data directory, so it ends up looking like this:
I hope this make it clear for everyone what must be done.
http://sourceforge.net/projects/warzone ... z/download for 2.3
http://sourceforge.net/projects/warzone ... z/download for trunk
you copy from the dev package "data" into your data directory, so it ends up looking like this:
Thanks to Fred for the confirmation on the directory structure.needed for fonts
...\data\etc
...\data\etc\fonts\fonts.dtd
...\data\etc\fonts\fonts.conf
...\data\etc\fonts\fonts.conf.old
needed for program to run, the external libs
...\data\libintl-2.dll
...\data\libiconv-2.dll
...\data\fontconfig.dll
...\data\freetype6.dll
...\data\glc32.dll
...\data\xmlparse.dll
...\data\zlib1.dll
...\data\SDL.dll
...\data\popt1.dll
and finally, once you compile the source code, it will produce this
warzone2100\data\Warzone2100-Dbg.exe
I hope this make it clear for everyone what must be done.
and it ends here.