Re: [Pixil-devel] ViewML - FONT issues...

Jason Kingan <[email protected]> Wed, 22 Sep 2004 11:18:58 -0600
Newsgroups gmane.comp.web.viewml.devel
Message-ID <[email protected]>
On Sep 22, 2004, at 8:03 AM, Cedric Vandenbergh wrote:

> Hi all,
>
> I am trying to get ViewML up and running but have run into
> some difficulties.
>
> For some reason, db_getDefaultDB() is returning garbage and
> as a result the db_openDB() call fails. I have added a check
> to ensure I don't dereference a null pointer in nxslider.cpp.
>
> [What is the correct fix for this? I assume something is not
> set correctly in the config. I have exported PARDB correctly,
> but no joy. - not a major issue, but irritating.]

Are you just building from within the ViewML directory? Or from the top 
down? If you run a make directly from the ViewML directory, some of the 
global settings don't get set properly. This is a limitation of the 
current PIXIL PDA build tree. It's possible that if you were trying to 
debug the following problem that it got built without the correct PARDB 
being set. If this is the case, a clean of ViewML and a top-level build 
will fix this up.

Also, did you run "make install" to get a valid PAR database built and 
put in the right location? Check to make sure there is one in place at 
the location specified in PARDB.

If one of these two doesn't fix your problem with this, please let me 
know and I'll debug it further with you.

> The other issue is that ViewML appears to be completely
> ignoring the FACE="times" or SIZE="" tags in the sample HTML
> document I have prepared.

The problem resides with FLTK. The bottom end of ViewML sits on top of 
FLTK to it will run on X11 and Microwindows. FLTK has some limitations 
in its font handling capabilities, namely that it uses a (more-or-less 
hardcoded) font table that you index into. So instead of requesting 
"times new roman 10 pt", you request font number 5 (or whatever.) For 
this reason, the FACE tags aren't supported in ViewML. However, it 
would be possible to get some minimal support if you matched up the 
limited FLTK fonts in it's table and put in some sort of conversion 
table for ViewML, but this would be pretty unreliable.

Another possibility is to change ViewML so it doesn't use FLTK for 
drawing HTML text, but instead uses Microwindows directly. You'd have 
to #ifdef it for use with X11, but it would be possible. This is 
probably the best solution if you need this capability.

Jason Kingan
Century Software