Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[XForms] Can't figure out how to change font size

4 views
Skip to first unread message

Patrick

unread,
Sep 4, 2015, 9:46:28 PM9/4/15
to Development with and of XForms
Hi Everyone

I cannot figure out how to change font size. The code at the end of this
email has multiple attempts but all the fonts remain the same.

I am wondering if there is an issue on my computer outside of xforms.

Do you have any samples I can run here or does my example change size on
your computer ?

-Patrick

code:


int main( int argc, char * argv[] ){
fl_initialize( &argc, argv, "FormDemo", 0, 0 );
FL_FORM *my_form = fl_bgn_form( FL_FLAT_BOX, 500, 150 );

FL_OBJECT *button1 = fl_add_button( FL_NORMAL_BUTTON, 1, 1, 80, 20,
"button 1" );
fl_set_object_lsize( button1, FL_TINY_SIZE );

FL_OBJECT *button2 = fl_add_button( FL_NORMAL_BUTTON, 1, 30, 80,
20, "button2" );
fl_set_object_lsize( button2, FL_HUGE_SIZE );

FL_OBJECT *my_input = fl_add_input(FL_NORMAL_INPUT, 1, 60, 300, 50,
"my_input" ) ;
fl_set_object_lsize(my_input, FL_HUGE_SIZE) ;



fl_set_font( FL_HUGE_SIZE, FL_HUGE_SIZE );
fl_set_input(my_input, "this is a test") ;
fl_end_form();
fl_adjust_form_size( my_form );

fl_show_form( my_form, FL_PLACE_ASPECT, FL_TRANSIENT, "Buttons" );

FL_OBJECT * eventptr ;
int x = 1 ;
while(x != 0) {
eventptr = fl_do_forms() ;
}


return 0 ;
}

Frank Cox

unread,
Sep 4, 2015, 10:00:18 PM9/4/15
to xforms-de...@nongnu.org
On Fri, 04 Sep 2015 21:46:01 -0400
Patrick wrote:

> Hi Everyone
>
> I cannot figure out how to change font size. The code at the end of this
> email has multiple attempts but all the fonts remain the same.
>
> I am wondering if there is an issue on my computer outside of xforms.

Do you have the necessary fonts installed? I had to install the xorg-x11-fonts-100dpi rpm on my Centos 7 machines before I could get different sizes and boldface and whatnot.

Unlike stuff that uses truetype fonts, xforms uses fixed size bitmap fonts so if you don't have the exact font size and style that you want to show installed, it ain't gonna show.
--
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com

Patrick

unread,
Sep 4, 2015, 10:24:44 PM9/4/15
to Development with and of XForms
On 09/04/2015 10:00 PM, Frank Cox wrote:
> On Fri, 04 Sep 2015 21:46:01 -0400
> Patrick wrote:
>
>> Hi Everyone
>>
>> I cannot figure out how to change font size. The code at the end of this
>> email has multiple attempts but all the fonts remain the same.
>>
>> I am wondering if there is an issue on my computer outside of xforms.
> Do you have the necessary fonts installed? I had to install the xorg-x11-fonts-100dpi rpm on my Centos 7 machines before I could get different sizes and boldface and whatnot.
>
> Unlike stuff that uses truetype fonts, xforms uses fixed size bitmap fonts so if you don't have the exact font size and style that you want to show installed, it ain't gonna show.
Hi Frank!

Thanks very much for your help. I am running Trisquel(Ubuntu based). It
looks like we don't have a simple package like you have on Centos and I
am trying to figure this out. I am sure I will get though it.

Thanks for taking the time to help me-Patrick



0 new messages