[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XForms] Another question on fonts
Re: [XForms] Another question on fonts
Fri, 24 Oct 2014 19:20:42 -0700
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
I have been using Mint distros (Ubuntu derivative) for several years now
into the font problems with my GUIs, because the fonts required by the
library are no longer part of the default installation. (You can use
see the fonts installed on your system, and available to xforms.)
Recently I have made some modifications to lib/fonts.c and demos/fonts.c
xforms-1.2.4 library, which allowed me to make the following observations:
- xforms installs a substitute if a particular font is not available. On my
system this is
- this substitute comes with fixed size; requests for other sizes have
- for an installed font, the final font size is chosen according to the
point size, with pointsize=10*size (if available). This behavior is
for GUI building, because the widgets are specified in terms of
pixels, not points.
- the system chooses 75dpi or 100dpi fonts, whatever fits best for the
- scaled fonts are generally ugly and not usable.
Because the behavior is so unpredictable, it is probably best to limit
the number of
fonts in a GUI and use font specifications which include specific sizes,
by other authors. However the case of automatic font substitution still
needs to be
addressed for systems where the default xforms fonts are not installed.
I can make the modified library available on request.
On 10/23/2014 10:35 AM, address@hidden wrote:
Send xforms-development mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of xforms-development digest..."
1. Re: Another question on fonts... (Serge Bromow)
Date: Thu, 23 Oct 2014 13:35:05 -0400
From: Serge Bromow <address@hidden>
Subject: Re: [XForms] Another question on fonts...
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
NOW YOU TELL ME!!! lol...
On 10/21/2014 03:00 PM, Jens Thoms Toerring wrote:
On Tue, Oct 21, 2014 at 12:06:33PM -0400, Serge Bromow wrote:
I found the same problem when I moved to a new OS. The fonts were
there but the system choose 100dpi instead of 75dpi which I was
apparently using. All the programs exhibited large fonts. I fixed
this by adding the following before fl_initialize;
That's one way to make sure that the 75dpi fonts are
definitely used by that application. A different method,
if my memory isn't playing tricks, would be to change the
"font path" on the system. You can get the current setting
(with some other information) with the command
Now, if the directories with the 100dpi fonts come before
the ones with the 75dpi fonts, then, when no pixel reso-
lution is set explicitely in the XLFD font name, the
first one in the path is used. If you change the font
path to something where the 75dpi fonts come first with
the appropriate 'xset' command
xset fp rehash
This should make this a system-wide setting if done early
Thebackground to this whole mess is, I think, that in
former times lower-resolution screens (with about 75 dpi)
were the most common and thus the default setting was to
have the corresponding fonts first in the path. Later most
people switched to higher-resolution screens and thus the
default was changed to have the 100 dpi fonts first in the
font path. But that led to some trouble with programs that
were designed to work with 75 dpi fonts...
If I'm not mistaken the function fl_adjust_form_size() was
introduced to solve exactly this problem: it checks if
(inside) labels fit into their objects and, if not, scale
up the form by a factor, which can't be larger than 1.25.
So adding a call of this function somewhere after the forms
have been created might be another way to get around the
Unfortunately, nothing of this will help if the core X11 fonts
aren't even installed on a system:-(
Best regards, Jens
|[Prev in Thread]
||[Next in Thread]|
- Re: [XForms] Another question on fonts,