Discussion:
[Pixil-devel] ViewML - FONT issues...
Cedric Vandenbergh
2004-09-22 14:03:08 UTC
Permalink
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.]

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 below is the output produced when I set MARTINSDEBUG to 1
in html.h. Why does it insist on using System? When I run the
various font demos that come with MicroWindows these all work
fine (I have checked to see that times and arial are in the
freetype 1 directory).

Any suggestions as to what is causing this?

Oh yes, pixil 1.2.3, MicroWindows 0.90. PPC405 based system.

Thanks,

Cedric

--- cut here ---

# ./viewml http://192.168.0.203/~rcmav
Main window: 0x10141950
resize_notify of 0 0 640 480
freetype_createfont: System,14 not found
t1lib_createfont: System,14 not found
resize_notify of 3 16 640 480
got charset qtCharset=0
Setting charset to:
Original font: face: times qtCharset: 2147482496
Changed font: face: times qtCharset: 2147482496
Got font: 0x1014a420
Got font: face: times qtCharset: 2147482496
painter: 0x10158ed8
Font stack top: 0x1014a420
Timer event
Killing timer
Has more tokens?
Storing font info
Setting font
Getting height
Parsing body height
freetype_createfont: System,18 not found
t1lib_createfont: System,18 not found
Restoring font
Synchronizing painter's background
Parsin is over?
Yes
Parsing done

--- cut here ---
Jason Kingan
2004-09-22 17:18:58 UTC
Permalink
Post by Cedric Vandenbergh
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.
Post by Cedric Vandenbergh
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

Loading...