>
> > We are facing issue in setting the labelsize and labelfont using
> > fltk1.3.2 , It always sets to default size,font and color.
> > =
>
> > We have build fltk1.3.2 with ./configure --shared --thread options.
> > =
>
> > We were using fltk2.0 and were able to change the label
> > size,font,color.Since after going through the articles on version we
> > considered fltk1.3.2 is a stable version and moved from fltk2.0 to
> > fltk1.3.2.
> > =
>
> > Please can you help us in resolving this issue,
>
> You'll need to show us what you are doing, since (as the saying goes) "It w=
> orks OK for me..."
>
> Can you post a minimal, complete, compileable, sample that shows what you a=
> re doing and exhibits the fault?
>
>
>
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>
We have built FLTK1.3.2 on x86 with the following configuration
$ ./configure --prefix=/home/sachin/FLTK1.3.2_test/ --enable-threads
--enable-shared --enable-gl --enable-Xft --enable-x11
--with-x --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
When we run the test/fonts.cxx we are not able to choose between the fonts and
the font size on the X window.It shows the default.
We made a sample program and linked with all the possible libraries as linked
by FLTK2.0 but still we get the same result ie default font(Helvitica)
and font size(14) on X windows, even though labelsize(20) returns 20 on the
console
Below is the sample program - label.cxx,label.h and Makefile
----------------------------------------------------------------------------------
/* label.cxx */
#include "label.h"
label::label()
{
Fl_Double_Window* w;
{
Fl_Double_Window* o = new Fl_Double_Window(400, 400);
w = o;
o->user_data((void*)(this));
{
Fl_Box* o = new Fl_Box(45, 135, 295, 60, "label");
o->box(FL_FLAT_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->labelsize(20);
Fl_Font font = o->labelsize();
printf("Font size = %d\n",font);
} // Fl_Box* o
o->show();
o->end();
} // Fl_Double_Window* o
}
int main(int argc,char **argv)
{
new label;
return(Fl::run());
}
----------------------------------------------------
/* label.h */
#ifndef label_h
#define label_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
class label {
public:
label();
};
#endif
-----------------------------------------------------
/* Makefile */
OBJCPP=$(subst .cxx,.o,$(wildcard *.cxx))
OBJ=$(subst .c,.o,$(wildcard *.c))
EXE=sample
CC=$(CROSS)g++
CFLAGS=-Wall -O2 -D__DEBUG
LDFLAGS=-lpthread -lfltk -lm -lfltk_images -ljpeg -lpng
ifdef DEBUG
CFLAGS += -DDEBUG
endif
ifdef GDB_DEBUG
CFLAGS += -g -rdynamic
endif
ifdef CROSS
CFLAGS +=-DMAGUS_PLATFORM -I/usr/local/arm/3.4.6/arm-linux/usr/include \
-I/usr/local/arm/3.4.6/arm-linux/usr/X11R6/include \
-I./inc -I./ -I./deps/pmp/
LDFLAGS +=-L/usr/local/arm/3.4.6/arm-linux/usr/X11R6/lib \
-L/usr/local/arm/3.4.6/arm-linux/usr/lib -L./deps/pmp \
-lX11 -lXi -lXext -lXrender -lfontconfig -lexpat -lfreetype -lXft
else
CFLAGS +=-I/home/sachin/home/sachin/FLTK1.3.2_test/include \
-I/usr/X11R6/include
LDFLAGS +=-L/usr/X11R6/lib \
-L/usr/lib \
-lX11 -lXi -lXext -lXrender -lfontconfig -lexpat -lfreetype -lXft
endif
$(EXE): ${OBJ} $(OBJCPP)
$(CC) -o $@ $(OBJ) $(OBJCPP) $(LDFLAGS)
$(OBJCPP):%.o:%.cxx
$(CC) $(CFLAGS) -c -o $@ $<
$(OBJ):%.o:%.c
arm-linux-gcc $(CFLAGS) -c -o $@ $<
all: $(EXE)
# cp $(EXE) ../
clean:
rm -f $(EXE) $(OBJ) $(OBJCPP)
install:
uninstall:
------------------------------------------------------------------------------
Output on the console:
Font size = 20
------------------------------------------------------------------------------
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk