Xboard, clock fonts too big?

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Xboard, clock fonts too big?

Postby Miguel A. Ballicora » 09 Jun 2010, 09:46

First of all, the latest xboard is working great, and the bug that did not allow to have the names of the engines at the top is gone.
This is xboard 20100327

However, it seem that now the fonts for the clock are too big
This is in -size middling
http://sites.google.com/site/gaviotache ... figuration

in -size mediocre, the fonts do not get any smaller and the numbers do not fit the space allocated.

http://sites.google.com/site/gaviotache ... enshot.png

Miguel
User avatar
Miguel A. Ballicora
 
Posts: 160
Joined: 03 Aug 2005, 02:24
Location: Chicago, IL, USA

Re: Xboard, clock fonts too big?

Postby Josh Pettus » 11 Jun 2010, 04:58

sorry to hijack your thread, but you can use chess fonts with xboard? Wonder why it won't work for me.
Josh Pettus
 
Posts: 312
Joined: 11 Mar 2009, 01:11

Re: Xboard, clock fonts too big?

Postby H.G.Muller » 15 Jun 2010, 19:37

Font-based rendering of pieces only works in WinBoard. XBoard accepts user-supplied bitmaps or pixmaps to acheive a similar purpose, throught the options -bitmapDirectory and -pixmapDirectory.

As to the font sizes, I would have to check if everything works as intended. Now that XBoard saves its settings, I had to do some re-designing of how the font options work, to prevent that a font size, once set, is remembered and applied when the next time another board size is used. So, like for WinBoard, the settings file stores a separate font (actually 3 fonts, for clock, coordinates and dialogs) for each square size. It does this by prefixing the font description with the square size. When such a prefixed font-name is encountered as a value of a font option, it is remembered (so it will be saved), but only applied if the corresponding boardSize is indeed selected. An 'old-style' font name, without size prefix, will be applied, and saved in the ini file with the prefix corresponding to the actually used boardSize (which is currently still unchangeable in XBoard during the session).
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard, clock fonts too big?

Postby nepossiver » 05 Jul 2010, 05:19

I've installed the latest xboard from HGM git repository (xboard master-20100327) and I am having the clock font problem. I try to change the .xboardrc file from

¨-clockFont size33:-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1"

to

¨-clockFont size33:-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1"

(which I suppose should be available, as it is the font used in "-font size33:"), but when I start xboard again the .xboardrc file changes back to ¨-clockFont size33:-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1".

Is there a way to setting the clock font size to small when using small or petite board sizes? From HGM previous post I gather there is, but doesn't seem straightforward to me...

thanks
nepossiver
 
Posts: 31
Joined: 21 Sep 2008, 17:00

Re: Xboard, clock fonts too big?

Postby H.G.Muller » 05 Jul 2010, 08:24

OK, I figured it out:

It turns out that the master settings file we distribute, and which is installed in /usr/local/etc/xboard.conf, also contains font settings. In the new system this will not work anymore. The three font options should be deleted from the xboard.conf file.

The problem is that these font names were not prefixed with sizeXX: , so they will be applied to any board size. If such a general font argument is given, it will overrule any argument specific for one size (as stored in the .xboardrc). This so that there is backward compatibility with the way to specify fonts from the command line; they will then be applied to the current board size only.

I had not noticed that the distributed xboard.conf is wrong, because when I install it goes into /usr/local/etc, while the xboard binaries I test always take them from /etc, where I had a correct xboard.conf from earlier versions.

After fixing the etc/xboard.conf, you will also have to fix the .xboardrc in your home directory, as data in the former will propagate to the latter (prefixed with sizeXX:, so it only applies to the boardSize you are using) every time you run xboard.
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard, clock fonts too big?

Postby nepossiver » 05 Jul 2010, 14:09

ok, this did the trick! I haven't found the /usr/local/etc/xboard.conf previously, as I only looked at /etc

thanks

edit:

here is what I did: I commented out the font lines on the /usr/local/etc/xboard.conf, and then edited the /home/me/.xboardrc. This shows my xboard is reading the settings from /usr/local/etc/xboard.conf, I don know if this is the intended behaviour.
nepossiver
 
Posts: 31
Joined: 21 Sep 2008, 17:00

Re: Xboard, clock fonts too big?

Postby H.G.Muller » 05 Jul 2010, 14:32

Indeed, this is the new behavior, which I am no happy with, but seems to be standard. For the autotools process to be configuration independent, the file should go in the directory referred to as $(SYSCONFDIR). When installing from source this translates to /usr/local/etc on Debian systems. But the Debian binary package would install it in /etc in stead, as xboard is considered a system command. (So to make the package, they should compile in a non-standard way, redefining SYSCONFDIR.)

The problem is that the docs are adapted to the binary package, and redefining SYSCONFDIR does not alter what is written in the docs. But in any case the xboard binary should be compatible with the place where it is installed, if you make them from the same Makefile.

The /usr/local/etc/xboard.conf contains only a few settings, and then redirects reading and writing of settings to /home/me/.xboardrc. This way it is protected from overwriting when xboard saves settings: they go to the ~/.xboardrc. If you want them go to another file, like ./xboard.ini, you can specify that in the xboard.conf.
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard, clock fonts too big?

Postby TrojanHorse » 10 Feb 2011, 20:44

H.G.Muller wrote:OK, I figured it out:

It turns out that the master settings file we distribute, and which is installed in /usr/local/etc/xboard.conf, also contains font settings. In the new system this will not work anymore. The three font options should be deleted from the xboard.conf file.

The problem is that these font names were not prefixed with sizeXX: , so they will be applied to any board size. If such a general font argument is given, it will overrule any argument specific for one size (as stored in the .xboardrc). This so that there is backward compatibility with the way to specify fonts from the command line; they will then be applied to the current board size only.

I had not noticed that the distributed xboard.conf is wrong, because when I install it goes into /usr/local/etc, while the xboard binaries I test always take them from /etc, where I had a correct xboard.conf from earlier versions.

After fixing the etc/xboard.conf, you will also have to fix the .xboardrc in your home directory, as data in the former will propagate to the latter (prefixed with sizeXX:, so it only applies to the boardSize you are using) every time you run xboard.


Coming in here as a new user it seems to me like the best idea might not be to mess with this at all right? It seems like it would be quite tedious to adjust some details each and every time you run xboard. Am I misunderstanding something here? Very new to this. Thanks Boys!
User avatar
TrojanHorse
 
Posts: 5
Joined: 10 Feb 2011, 19:29

Re: Xboard, clock fonts too big?

Postby H.G.Muller » 11 Feb 2011, 10:24

The idea of having the settings file is exactly that you would not have to mess with this every time you run XBoard. You can just run XBoard once with the option -clockFont XXX, where XXX is one of these horrible X-font specifications, and from then on XBoard will automatically use that font (in that board size) for clock display. A very competative alternative is to edit ~/.xboardrc; usually, when you want to change a setting of a persistent option, putting the new setting on the commandline is much easier, but due to the horribly long font names, it can be better to alter the existing name (or just the aspects of it you want changed, like point size) in the .xboardrc file. XBoard does not have a menu dialog yet to select fonts (like WinBoard has).
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 5 guests