[Top][All Lists]

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

Re: [XForms] pre-release xforms-1.3.12

From: oleuthold
Subject: Re: [XForms] pre-release xforms-1.3.12
Date: Mon, 30 Jun 2014 20:56:44 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi Jens,
I think there is a problem with slot 16 of the X11 font array: ( fl_set_font_name(16,"blah"). When selecting such a font on the browser of the modified demo/fonts.c (attached), the application seg faults. Slot 17 is fine. If slot 16 is a non-existing font, and slot 17 exists, then slot 17 seg faults. You can replace the original demo/fonts.c with the attached version and recompile the library to create the error. (If you do not have "misc-fixed-medium-r-semicondensed" on your system, you need to replace the line with the name of another font which exists [flag=0]).

The DejaVu Sans condensed produces shorter labels, which are very similar to Helvetica.

You are right about the flag; the flag fl_set_font_name for X11 fonts reports correctly whether the font exists (see example above), but the flag for fl_set_xft_font_name is indeed useless.
I might have to resort to something like
        char test[300];
        sprintf(test,"fc-list|grep -q '%s'",fontname);
        if(system(test)==0) printf("%s font found\n",fontname);
        else printf("font NOT found\n");
to find out whether the font exists, or whether another one should be tried, or suggest installing the correct font for best user experience.

On 06/29/2014 09:00 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..."

Today's Topics:

    1. New releas xforms-1.2.4 (Jens Thoms Toerring)
    2. Re: pre-release xforms-1.3.12 (address@hidden)
    3. Re: pre-release xforms-1.3.12 (Jens Thoms Toerring)

On Sat, Jun 28, 2014 at 04:28:59PM -0700,address@hidden  wrote:
       I think that the functions

        void fl_set_global_font_scaling(double scale); and
        void fl_set_font_scaling_factor(int    index, double factor);

are missing in the forms.h header file.
Thank you, I indeed forgot to add them! Just uploaded a corrected version of xforms-1.3.12.tar.gz (and, of course, to the git repo- sitory).
The function int fl_set_xft_font_name(int index, const char * name,
                            int slant, int weight);
works as expected. This will allow me to use the condensed font, and
check whether the font is available on the system.
Fine;-) But the question remains if using the condensed fonts per default would be better if they deviate less from the old fonts? BTW, how do you want to use that function to check if a font is available? I haven't yet found a way to do that at all since the Xft function called for loading a font always suc- ceeds, even if you pass it some font name that definitely does not exist - it always gives you a font. Nice for me since I don't have to care about finding a replacement font myself, but it would also be nice to have some indication what actually got loaded (I haven't found out yet if and how one might use the 'pattern' member of the XftFont structure, the real font name may be stored in there somewhere...). Best regards, Jens

Attachment: fonts.c
Description: Text Data

reply via email to

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