nanogui: problems related to microwindows v0.89pre2


Previous by date: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Greg Haerr
Next by date: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Jason Kingan
Previous in thread: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Greg Haerr
Next in thread: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Jason Kingan

Subject: Re: problems related to microwindows v0.89pre2
From: Jeff Moellmer ####@####.####
Date: 5 Oct 2000 15:56:05 -0000
Message-Id: <39DDF720.A9D67E18@censoft.com>

####@####.#### wrote:


> Problems related to fltk:
> 4) Popup menu object changed?
> When the popup menu is tapped, it shows a separate window instead of popup menu.
>  Also, the separate window contains nothing rather that menu items.

I checked the cvs logs, there have not been any changes to the popup menu object. I
have also check for changes in other core files (i.e. Fl_x.cxx, etc. ) and there
have not been any changes that should effect the popup menus. Are you using the
Nano-X windows manager (nanowm)? I've noticed that it will put a title bar and
border around menu bars and popups. Flnx was setting all new objects to the root
window, even if it had a parent. I have fixed this behavior and will put it into
cvs after I have tested it more. To see what I mean, run flnx/tests/tile: you'll
see that the child window is positioned in the wrong place (because it thinks its
parent is the root window). Even though this fixes some of the issues with nanowm,
it still will put titles and borders around many items. This is something I'll have
to look into... What I think is happening is that the nanowm will put a window
around anthing that has a window id (even if it has a parent window).

>
> 5) How can I change the font size or type in fltk?
> It seems there is only one font size/type shown on my application even I
> explicitly change the font size/type in program.
> Can the problems be solved when using True Type font instead?

True type fonts will fix this problem. Another way to try is to edit fl_fonts.cxx
and then recompile.

In fl_fonts.cxx you'll find this:

////////////////////////////////////////////////////////////////
#ifdef NANO_X
// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
static Fl_Fontdesc built_in_table[] = {
{"/usr/X11R6/lib/X11/fonts/webfonts/arial.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/ariali.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/cour.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/couri.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/times.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesi.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
/*{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"}
*/
};
#else
// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
static Fl_Fontdesc built_in_table[] = {
{"-*-helvetica-medium-r-normal--*"},
{"-*-helvetica-bold-r-normal--*"},
{"-*-helvetica-medium-o-normal--*"},
{"-*-helvetica-bold-o-normal--*"},
{"-*-courier-medium-r-normal--*"},
{"-*-courier-bold-r-normal--*"},
{"-*-courier-medium-o-normal--*"},
{"-*-courier-bold-o-normal--*"},
{"-*-times-medium-r-normal--*"},
{"-*-times-bold-r-normal--*"},
{"-*-times-medium-i-normal--*"},
{"-*-times-bold-i-normal--*"},
{"-*-symbol-*"},
{"-*-lucidatypewriter-medium-r-normal-sans-*"},
{"-*-lucidatypewriter-bold-r-normal-sans-*"},
{"-*-*zapf dingbats-*"}
};
#endif

What you want to do is comment out the top part and use the bottom part. Then
recompile (You'll have to get rid of the macros too, of course). So basically
you'll end up with something like this:

////////////////////////////////////////////////////////////////
//#ifdef NANO_X
// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
/*
static Fl_Fontdesc built_in_table[] = {
{"/usr/X11R6/lib/X11/fonts/webfonts/arial.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/ariali.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/cour.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/couri.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/times.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesi.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"}

};
#else
*/

// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
static Fl_Fontdesc built_in_table[] = {
{"-*-helvetica-medium-r-normal--*"},
{"-*-helvetica-bold-r-normal--*"},
{"-*-helvetica-medium-o-normal--*"},
{"-*-helvetica-bold-o-normal--*"},
{"-*-courier-medium-r-normal--*"},
{"-*-courier-bold-r-normal--*"},
{"-*-courier-medium-o-normal--*"},
{"-*-courier-bold-o-normal--*"},
{"-*-times-medium-r-normal--*"},
{"-*-times-bold-r-normal--*"},
{"-*-times-medium-i-normal--*"},
{"-*-times-bold-i-normal--*"},
{"-*-symbol-*"},
{"-*-lucidatypewriter-medium-r-normal-sans-*"},
{"-*-lucidatypewriter-bold-r-normal-sans-*"},
{"-*-*zapf dingbats-*"}
};

// #endif

>
> 6) Font misalignment
> I find the font misalign when scrolling.
> Can I solve the problem by invoke Fl_Scroll::redraw() method after scrolling? On
>  the other hand, it there a callback during scrolling?
> I've tried but not find. Please advise.

Can you give me some more details? How does it misalign? If you're using the
default font, the text is misaligned vertically on everything (i.e. buttons, etc.).
Try changing the font (use true type, for example) and see if that fixes it.

Thanks!

Jeff


Previous by date: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Greg Haerr
Next by date: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Jason Kingan
Previous in thread: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Greg Haerr
Next in thread: 5 Oct 2000 15:56:05 -0000 Re: problems related to microwindows v0.89pre2, Jason Kingan


Powered by ezmlm-browse 0.20.