nanogui: Thread: problems related to microwindows v0.89pre2


[<<] [<] Page 1 of 1 [>] [>>]
Subject: problems related to microwindows v0.89pre2
From: ####@####.####
Date: 5 Oct 2000 10:12:22 -0000
Message-Id: <4825696F.00377554.00@HKGWEB01.VTECH.COM.HK>

Hi Greg,

It is wonderful for your latest release of Microwindows v0.89pre2. It provides
most things I am working.
Would you like to give me some advice of the following questions?

1) How to use True Type fonts correctly?
I find that all strings are of the same fonts in logfont.sh demo.
something like that:
Proportional
Bold Proportional
Italics Proportional
Bold Italics Proportional
Oblique Proportional
...
...


Which directory should I place the -fonts-truetype-0.89pre2, I mean under
microwin or microwin/src or microwin/src/fonts ,etc.

2) Do you have any idea why the nxkbd and nxscribble cannot run in background on
 Assabet board (arm-linux)?
I got the following errors:

./nxkbd &
[1] 74
Client: bad readblock -1
CRITICAL: Client 74: Corrupted packet

[1]+ Broken pipe ./nxkbd


*remark: nxkbd and nxscribble can be run properly under native linux (X86)

3) Cannot focus on input field
condition : I run my application which is written by fltk after running
scribble.sh demo

The cursor will disappear when I focus the soft keyboard.
This means I cannot send the keyboard event to the desired input field. I have
to push the top bar of window of my application, i.e. the window bar is
highlighted.
Then the problem seem be solved.
The drawback is that it is inconvenient to push the window top bar and then push
 the input field to focus.
I think it is natural the user just push or tap the input field to focus and
then turn to soft keyboard to send the key event to the focused input field.

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.

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?

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.


Thanks,
Hifi Wong.



Subject: Re: problems related to microwindows v0.89pre2
From: "Greg Haerr" ####@####.####
Date: 5 Oct 2000 15:07:54 -0000
Message-Id: <098701c02ede$2e20e8e0$15320cd0@gregh>

: 1) How to use True Type fonts correctly?
: I find that all strings are of the same fonts in logfont.sh demo.
: something like that:
: Proportional
: Bold Proportional
: Italics Proportional
: Bold Italics Proportional
: Oblique Proportional

I'll fix up the logfonts demo, it currently doesn't work.




: Which directory should I place the -fonts-truetype-0.89pre2, I mean under
: microwin or microwin/src or microwin/src/fonts ,etc.

By default, the configuration file specifies FREETYPE_FONT_DIR=
"/usr/local/microwin/fonts"

This is my current recomendation for where to put the fonts.  Basically,
Microwindows gets a font path prefix compiled into the server.
When font facenames are passed to Microwindows without a
path or extension, the path is prepended and .ttf is added to
the end of the facename and that font file is opened.
I'm working on a simple font selector from the MWLOGFONT
struct, but that's not done yet.



:
: 2) Do you have any idea why the nxkbd and nxscribble cannot run in background
on
:  Assabet board (arm-linux)?
: I got the following errors:
:
: ./nxkbd &
: [1] 74
: Client: bad readblock -1
: CRITICAL: Client 74: Corrupted packet
:
: [1]+ Broken pipe ./nxkbd
: *remark: nxkbd and nxscribble can be run properly under native linux (X86)

Hmm.. Interesting. Looks like a porting/architecture issue.  I've not
tried nxkbd on StrongARM yet.  I've had nxscribble running on the
iPAQ, but not with this release.  Jason - did you compile up
pre2 on the iPAQ yet?


:
: 3) Cannot focus on input field
: condition : I run my application which is written by fltk after running
: scribble.sh demo
:
: The cursor will disappear when I focus the soft keyboard.
: This means I cannot send the keyboard event to the desired input field. I have
: to push the top bar of window of my application, i.e. the window bar is
: highlighted.
: Then the problem seem be solved.
: The drawback is that it is inconvenient to push the window top bar and then
push
:  the input field to focus.
: I think it is natural the user just push or tap the input field to focus and
: then turn to soft keyboard to send the key event to the focused input field.

This sounds like a complex focus issue.  I will look into this.
There is quite a bit of work in development regarding focus with
the pre2 release, and it sounds like I don't have it right yet. ;-)



The following issues will be worked on by Century Software:
:
: 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.
:
: 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?
(Jordan - now that pre2 is released, you'll want to change
FLTK to handle the truetype fonts as we discussed...)

:
: 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.
(Dave - comments?)

Regards,

Greg



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

Subject: Re: problems related to microwindows v0.89pre2
From: Jason Kingan ####@####.####
Date: 5 Oct 2000 17:12:53 -0000
Message-Id: <20001005101231.D25465@pc224.censoft.com>

> Hmm.. Interesting. Looks like a porting/architecture issue.  I've not
> tried nxkbd on StrongARM yet.  I've had nxscribble running on the
> iPAQ, but not with this release.  Jason - did you compile up
> pre2 on the iPAQ yet?

It works fine on the ADS box (also a StrongARM).

jason

Subject: problems related to microwindows v0.89pre2
From: ####@####.####
Date: 17 Oct 2000 10:10:16 -0000
Message-Id: <4825697B.0037406F.00@HKGWEB01.VTECH.COM.HK>

Hi Greg,

Would you like to give me some advice of the following questions?

My config file setting is as below:
LINK_APP_INTO_SERVER     = Y
HAVE_BMP_SUPPORT         = Y
HAVE_GIF_SUPPORT         = Y
HAVE_JPEG_SUPPORT        = Y
HAVE_T1LIB_SUPPORT       = Y
HAVE_FREETYPE_SUPPORT    = Y
FREETYPE_FONT_DIR        = "/usr/local/microwin/fonts"
HAVE_SHAREDMEM_SUPPORT   = Y

1) Font engine
I copy all necessary fonts file under $(FREETYPE_FONT_DIR) and turn on
HAVE_FREETYPE_SUPPORT flag.
Unluckily, I cannot change the font type or size even after I did that.
It seems the demo ftdemo.sh, t1demo.sh and logfont.sh cannot also work properly.

e.g. ftdemo.sh shows
gE

ût été Ã

´t

é de lÃ

?...


e.g. t1demo.sh
Microwindows (only one type and size) display overlapped endlessly.

2) Jpeg viewer
I run demo3.sh followed by jpeg file. The program seem running but I see nothing
 but black window. Any advice?


3) Running application without windows manager
I'd like to run my application with nanowm.
How can I specify the location of other programs, e.g. nxkbd, nxscribble? I
prefer to link and embed them into my application in fixed position.
Is there any parameter such as -geometry option, etc?

How can I take focus on my application, otherwise, the nxkbd or nxscribble
cannot send events to it?

Remark: Under nanowm, I can click the title bar of my application program to
regain the focus.

4) nxterm demo
I can run nxterm well under native Linux. However, I encounter the following
error when it is run under Assabet platform.

Can't create pty /dev/ptyp0

What does that message mean?

5) Lost connection to nano-X server
Sometimes, it happens. It seems no improvement even if LINK_APP_INTO_SERVER is
set.
Just for own interest, what technique is used for IPC, e.g. named pipes,
client/server, message queue or shared memory, etc ?

6) Touch screen driver
I am using mou_ads.c as touch screen driver for the Assabet board. I find it is
not smooth enough for normal operation.
e.g. It display a irregular line (like a distorted sine wave) when I definitely
want to draw a straight line

Do you have any suggestion how to stabilize the touch screen motion, e.g. filter
 smoothing algorithm?
If there exist, how can I hack them into mou_ads.c


You help is highly appreciated.
Have a nice day!

Hifi Wong.

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.