xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Font issues


From: Jens Thoms Toerring
Subject: Re: [XForms] Font issues
Date: Tue, 27 May 2014 21:29:30 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Oskar,

On Mon, May 26, 2014 at 07:49:40PM -0700, address@hidden wrote:
>      after upgrading from Mint9 to Mint13, I noticed that fontsize
> and fontstyle in my GUIs were ignored. Finally I took some time to
> get to the bottom of the problem. My observations:
> 1. Mint9 has the Xforms default font Helvetica installed, whereas it
> is missing in Mint 13.

Oh, that's not good! Helvetica was a bitmap font that was
always available until now, as far as I know;-)

> 2. When the default font is missing, another one is substituted
> (which one? by xforms? by X11?)

That's a bit of a mixture. The requested fonts are as "loosely"
specified as possible, e.g., for normal Helvetica the library
asks for

"-*-helvetica-medium-r-*-*-*-?-*-*-p-*-*-*"

with just the '?' replaced by the size. So X11 has a lot of
leeway in selecting something. If Xlib still can't find any-
thing fitting XForms switches to "emergency mode" and tries
to use an already loaded font font with the nearest size to
what the caller requested. And if even that fails it finally
tries the rather ugly "fixed" and "6x13" fonts, which should
always available.

> 3. The fonts available to Xforms can be found using the xlsfonts
> command or the xfontsel graphic utility.
> 4. The Xforms demo fonts.c can be used to view the different fonts
> with different sizes.
> 5. Some of the fonts do not scale properly (for example 10 and 12
> are same size, 11 smaller than 10).

I guess that's some effect of using more or less randomly
picked replacement fonts when the requestd font isn't avai-
lable. But I haven't experienced that yet, on all machines
I've used the default fonts of XForms existed. Could be that
this is because I tend to install a lot of fonts when setting
up a new machine;-)

> 6. I can install xfonts-100dpi, which contains the Helvetica font.
> However this is really against the spirit of Linux; I guess that's
> why the font was removed in later versions of the Mint distro.

What do you consider to be against the "spirit of Linux"? As far
as I can tell I've never seen a machine with X11, be it Linux or
other types of UNIX, that hadn't had a 100dpi (and 75dpi) font
directory (some without too many others;-). My silent assump-
tion until today has been that these are an integral part of
an X11 installation. My Xlib programming manual lists '100dpi',
'75dpi' and 'misc' as *the* directories where fonts are to be
found (ok, the precise location has changed a bit over the
years). So I would consider it a mistake by Mint to not in-
stall these fonts by default - who knows how many programs
they're breaking for saving a measly 13MB?

> Here comes my question: would it be possible to include a free
> default font with Xforms, such that GUIs look the same on all
> distros? Some designers spend a lot of time arranging the widgets to
> produce something nice, but if the particular font is missing, then
> this effort can be wasted, and the GUI may look terrible. Any other
> ideas how to deal with font issues?

I can fully understand your point if view when I see how nice
your Lxardoscope looks like (for those not having seen it have
a look at <http://www.elecfreaks.com/2042.html>). As an aside,
would you allow me to use it for the screenshot page on
<http://xforms-toolkit.org>?

What I would be most concerned about here is that I have no good
idea what the consequences of something like that would be. As far
as I can see We would have to do at least

a) copy the fonts to some place, perhaps /usr/local/fonts/XForms?
b) modify the font path. Were do I set it? It could be in lots
   of different places and I have no idea of any reliable way to
   find it out. 'xset +fb path' won't do since, as far as I know,
   it stays only that way for the duration of an Xsession. I'm also
   not sure if modifying the font path behind the users back is the
   right thing to do...
c) run font configure, i.e., 'fc-cache -f'. But do all systems do
   it that way?

As you can see this seems to me to be rather complicatd to do cor-
rectly for all possible systems. I'm also not convinced that it's
fitting for a library that just uses fonts to mess around with the
font settings, which could affect other applications unless done
100% right.

I would tend to prefer to restrict XForms to clearly mention in the
documentation that some additional font packages might be required
and perhaps try to convince distributors to automatically install
them with XForms (I've got to find out if this can be done via some
entries in the libforms.spec file).

What do you think?
                               Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]