Font Problems with Trunk on Win Vista + VS2008

Discuss the future of Warzone 2100 with us.
Post Reply
Fred
New user
Posts: 5
Joined: 23 Jan 2010, 01:24

Font Problems with Trunk on Win Vista + VS2008

Post by Fred »

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 :)
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Buginator »

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 :)
Install the dll's and the required directories from the dev package.
You need to copy over /etc into the location where warzone2100.exe (and the .dlls) are.
and it ends here.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Zarel »

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.
crux
Trained
Trained
Posts: 139
Joined: 16 Jan 2010, 03:21

Re: Font Problems with Trunk on Win Vista + VS2008

Post by crux »

Zarel 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.
you don't get any fonts
Fred
New user
Posts: 5
Joined: 23 Jan 2010, 01:24

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Fred »

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.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Buginator »

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.
and it ends here.
Fred
New user
Posts: 5
Joined: 23 Jan 2010, 01:24

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Fred »

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?
That's correct, but this folder was never missing.

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.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Font Problems with Trunk on Win Vista + VS2008

Post by Buginator »

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:
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
Thanks to Fred for the confirmation on the directory structure.
I hope this make it clear for everyone what must be done. :)
and it ends here.
Post Reply