From: Kern S. <ke...@si...> - 2003-03-09 09:46:33
|
Hello Phil, Nice work. I didn't even think about what font I was using when I added it, I was just happy to figure out how to make it fixed. Your new default font seems much better to me. I guess, I probably would have implemented the font through .Xdefaults, but the way you did it is perfectly good as well. I'm impressed that you dug into Bacula enough to be able to add a new resource! I'll be very interested to see your patch -- looks like you forgot to attach it, or maybe the list doesn't forward those things ... Best regards, Kern On Sun, 2003-03-09 at 01:15, Phil Stracchino wrote: > Kern, > Let's step back a moment to that problem I reported of the gnome-console > coming up with a proportional font. > > To start with, I know now why it was happening. The problem was that > you had hardcoded -misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r as > the gnome-console font, and I have no koi8-r fonts installed on my > system. The gdk_font_load() call therefore failed, and gnome-console > instead used the default system font, which on this machine is Helvetica > and is not monospaced, as Gnome isn't bright enough to substitute the > same font in a locale it *does* have. > > I've made the following changes to fix the problem. > > Firstly, I have changed the definition of the default font to > -misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1, which should be > much more widely available. > > Secondly, I have modified gnome-console so that the console font > definition is no longer hardcoded except as a fallback. Instead, it is > now contained in a ConsoleFont resource in the gnome-console.conf file. > There may be multiple ConsoleFont resources; the gnome-console will try > to load each in succession until one of them works. If all ConsoleFont > resources fail, it will make one last hardcoded try to load the fallback > font -misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1. > > The ConsoleFont resource looks like this: > > ConsoleFont { > Name = Default > Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1" > } > > (This is, in fact, the ConsoleFont resource from gnome-console.in.) > > > The attached patch (made in src/gnome-console, and to be applied there) > implements this change. It modifies the following files: > > console.c > console_conf.c > console_conf.h > gnome-console.conf.in > gnome-console.conf > > > I have tested this fix extensively on my own system and verified that it > builds and works. > > (Incidentally, the Gdk2 documentation states that gdk_font_load() is now > deprecated and "should not be used in new code". It doesn't specify > what we're supposed to use instead, but I'm guessing some Pango API.) > |