ToME compiles but refuses to start on some Linux distros
Moderator: Moderator
Re: ToME compiles but refuses to start on some Linux distros
Ahahahahahah "logical" indeed ...
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: ToME compiles but refuses to start on some Linux distros
It's kind of logical in that it's ordered, but it's also utterly opaque...
I made it so that the game first tries to load 9x15, then if that doesn't work, it tries to load the same thing by the lengthy string name, and if THAT doesn't work, it resorts to "fixed" which is supposed to exist on every X11 installation. Fixed is small though, so it isn't very good. And if there still is no font, the game exits with an error message instead of crashing mysteriously.
I made it so that the game first tries to load 9x15, then if that doesn't work, it tries to load the same thing by the lengthy string name, and if THAT doesn't work, it resorts to "fixed" which is supposed to exist on every X11 installation. Fixed is small though, so it isn't very good. And if there still is no font, the game exits with an error message instead of crashing mysteriously.
Zothiqband -- still an Angband variant.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
Nerdanel, can you post the patch? I'd like to incorporate it into my branch of T2.
BTW, does the GTK2 interface support XFT fonts?
(I really need to fix running in the GTK2 interface, but I haven't really a clue how...)
BTW, does the GTK2 interface support XFT fonts?
(I really need to fix running in the GTK2 interface, but I haven't really a clue how...)
Re: ToME compiles but refuses to start on some Linux distros
Good thing I checked back here... eventually.
I don't have a patch as I also deleted dead code and stuff, but these snippets should be easy to apply:
The new font handling section of term_data_init in main-x11.c:
(The beginning of that is the same as in the old version.)
The new default font definitions in config.h:
This bit replaces the old bit with the DEFAULT_X11_FONT.
The fix turned out to be pretty simple after all.
I don't know about GTK2 so I can't help you there.
I don't have a patch as I also deleted dead code and stuff, but these snippets should be easy to apply:
The new font handling section of term_data_init in main-x11.c:
Code: Select all
/* No environment variables, use default font */
if (!font) font = DEFAULT_X11_FONT;
/* Prepare the standard font */
MAKE(td->fnt, infofnt);
Infofnt_set(td->fnt);
if (Infofnt_init_data(font))
{
if (Infofnt_init_data(DEFAULT_X11_FONT_FALLBACK))
{
if (Infofnt_init_data(DEFAULT_X11_FONT_FALLBACK2))
{
quit("Could not find a font");
}
}
}
The new default font definitions in config.h:
Code: Select all
/*
* OPTION: Default font (when using X11).
* The first two are the same font under different names.
* The "fixed" font should be found on any X11 system.
*/
#define DEFAULT_X11_FONT "9x15"
#define DEFAULT_X11_FONT_FALLBACK "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1"
#define DEFAULT_X11_FONT_FALLBACK2 "fixed"
The fix turned out to be pretty simple after all.
I don't know about GTK2 so I can't help you there.
Zothiqband -- still an Angband variant.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
Applied... Thank you very much.