[Top][All Lists]

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

Re: [XForms] Help with XForms

From: Jens Thoms Toerring
Subject: Re: [XForms] Help with XForms
Date: Fri, 11 Apr 2014 12:06:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)


On Fri, Apr 11, 2014 at 12:06:30PM +0530, Sunny wrote:
> I'm trying both the default font and a newly added one (DejaVu Sans).
> I was trying to change the the label size that is drawn on buttons by
> default - I am not using any text drawing function directly.
> Actually none of the lsizes work on my system for any font (lstyle).
> At first I thought that the default font was crappy and had no sizes,
> but this doesn't seem to be the case.

> void setup_dejavu_font()
> {
>     fl_set_font_name(DEJAVU_SANS,
                       "-*-dejavu sans-medium-r-*-*-*-*-*-*-*-*-*-*");
> }

The problem is that you don't have a '?' in the size field (the
forth of your stars) of the font name. If you change it to

            "-*-dejavu sans-medium-r-*-*-*-?-*-*-*-*-*-*"

(assuming that you actually have a scalable 'dejavu sans-medium'
font) setting different sizes via the lstyle should work.

> So for variety, I changed the font to DejaVu Sans which is a very
> popular font with many sizes. And indeed on a word processor, I can
> set the size for this font to anywhere between 2 to 72.

Installed means that when you do

   xfd -font "-*-dejavu sans-medium-r-*-*-*-?-*-*-*-*-*-*"

from the command line you get shown this font (and not some other

I've got a quite large collection of fonts but no dejavu sans
as a traditional X11 font. I've got a dejavu sans as a true
type font, but XForms can't use them. That's one of the things
I would like to change when I've got a bit more of time (though,
it will make it depend on another library, which might lead to
new problems:-(

> If I set the 8th field of the DEJAVU font-string to 80, then the font
> shows up in a nice regular size. Not the ugly 120 which just looks
> bad.

With the '*' instead of a '?' in the size field first fixed
sized font Xlib returns will be used - that's probably this
120 font. If you set one of the fields you reduce the se-
lection Xlib has quite a bit and it then may pick a font
that looks more what you expected.

> Also, the library for some reason crashes if you keep on increasing
> the counter value for 10 times or more. It seems to be related to the
> way the font is cached (???) in fonts.c. I have attached the backtrace
> as a text file - could you please have a look?

I can't reproduce it at the moment, for me it crashes with
a X error before it gets that far when he replacement font
is used;-) I'll take a good look!

                          Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

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