xforms-development
[Top][All Lists]
Advanced

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

Re: [XForms] Font Sizing Problem, Overlapping label text in form


From: Jens Thoms Toerring
Subject: Re: [XForms] Font Sizing Problem, Overlapping label text in form
Date: Sat, 19 Dec 2009 12:45:05 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Ron,

On Fri, Dec 18, 2009 at 03:40:46PM -0600, Ron Leck wrote:
> I have an application that uses xforms  1.0.91 to create a simple form
> for displaying status info and allow some editing from a profile text
> file.
> Here is how I start my form:
> 
>     fl_set_icm_color(FL_DARKCYAN, 214, 239, 255);   /* lightblue1  */
>     fl_set_icm_color(FL_WHEAT, 255, 255, 224);      /* lightyellow */
>     fl_set_icm_color(FL_CHARTREUSE, 214, 238, 214); /* lightgreen  */
> 
>     fl_initialize(&argc, argv, 0, 0, 0);
>     fd_edit2 = create_form_edit2();
>     fl_set_form_geometry(fd_edit2->edit2, 530,4,698,400);
> 
> My application has been developed and run under Red Hat and Redhat
> Enterprise Linux Version 5 , kernel 2.6.18 and it works perfectly.
> When I compiled on an Ubuntu 8.04.2, kernel 2.6.24 machine, the font is
> larger and overlaps the forms frame. 
>               
> I added:
>   
>    fl_adjust_form_size(fd_edit2->edit2);
> 
> to fix problem on Ubuntu computer but it didn't work.
> 
> Do you know of a solution? 
> Do I need a newer version of Xforms?
> Is there a problem with Ubuntu graphics drivers?

That's a bit difficult to answer. First of all, the function
fl_adjust_form_size() is meant for such cases but it has a
built-in upper limit for the magnification factor of 1.25.
The magnification factor is returned by the function and it
might be interesting to see what you end up with - if it's
1.25 it's likely that the built-in limitation kicked in. If
that's not the case it would seem to me that the Xserver
reports invalid invalid font sizes...

For me it's a bit difficult to figure out why it's going
wrong since I neither have RedHat nor an old Ubuntu version
(all I can say is that I didn't remember having such a pro-
blem when I was still using Ubuntu 8.04). Also the resolu-
tion of your monitor may play a role as well as some system
settings concerning the choice of fonts (e.g. if 100 DPI
fonts are used with a 75 DPI monitor).

If you are prepared to experiment a bit you could use 

fl_get_string_dimension( lstyle, lsize, string,
                         strlen( string ), &sw, &sh );

on the string that's overlapping and compare that to the
size of the object the string belongs to in order to get
an idea of how much magnification of the object would be
needed.

While I would recommend to use a newer version of XForms
I don't think that this will fix your problem, there
weren't any important change about the handling of fonts.

As you see I unfortunately have no simple solution for
this problem (or even a reliable guess at what's behind
the problem). If you have a bit more of information it's
possible that I can come up with a bit more but I can't
say for sure...
                            Best rgards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de




reply via email to

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