|
From: | oleuthold |
Subject: | Re: [XForms] Another question on fonts |
Date: | Fri, 24 Oct 2014 19:20:42 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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 in the
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 mysystem this is -Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO8859-1 - this substitute comes with fixed size; requests for other sizes have no effect. - for an installed font, the final font size is chosen according to the specified point size, with pointsize=10*size (if available). This behavior is not desirable 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 particular size.
- 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, as suggested 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. Best wishes Oskar On 10/23/2014 10:35 AM, address@hidden wrote:
Send xforms-development mailing list submissions to address@hidden To subscribe or unsubscribe via the World Wide Web, visit https://lists.nongnu.org/mailman/listinfo/xforms-development or, via email, send a message with subject or body 'help' to address@hidden You can reach the person managing the list at address@hidden When replying, please edit your Subject line so it is more specific than "Re: Contents of xforms-development digest..." Today's Topics: 1. Re: Another question on fonts... (Serge Bromow) ---------------------------------------------------------------------- Message: 1 Date: Thu, 23 Oct 2014 13:35:05 -0400 From: Serge Bromow <address@hidden> To: address@hidden Subject: Re: [XForms] Another question on fonts... Message-ID: <address@hidden> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" NOW YOU TELL ME!!! lol... Thanks Jens On 10/21/2014 03:00 PM, Jens Thoms Toerring wrote:Hi Serge, 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; fl_set_font_name(FL_NORMAL_STYLE, "-*-helvetica-medium-r-*-*-*-?-*-75-*-*-*-*"); [...]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 commandxset qNow, 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' commandxset fp=path[,path...]followed byxset fp rehashThis should make this a system-wide setting if done early enough. 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 problem. Unfortunately, nothing of this will help if the core X11 fonts aren't even installed on a system:-( Best regards, Jens
[Prev in Thread] | Current Thread | [Next in Thread] |