[Chameleon] Locate widget

Paul Spencer pagameba at magma.ca
Thu Sep 2 12:10:43 EDT 2004


Liz,

this is tricky.  The locate widget creates a new layer to place the 
point/rect annotations on the map, hence it uses mapserver's labelling 
which means that the font the locate widget uses must be available in 
the map file's fontset.

I suspect that the real fix to this would be for chameleon to replace 
the fontset of the users map file with its own manufactured font file 
that contains references to both the user's fonts and the built-in fonts 
(except where the user's font file already contains a reference to a 
built-in font).

The same would have to be done for symbols I guess.

Ideally, it would be possible to access information about fonts and 
symbols through mapscript so that an application could do intelligent 
things like add fonts on the fly.

Please file as a bug/enhancement :)

Cheers,

Paul

Godwin, Elizabeth wrote:

> Ok... So it seems I looked too quickly.  I think I also assumed that the
> widget was calling the default fonts (chameleon/etc).
> 
> That said... should a generic widget be using it's OWN fonts, or those
> supplied by the application?  It's obviously using mine, but one
> shouldn't have to go and change the widget to change the font used by
> the locate widget.
> 
> Perhaps it should be an attribute set at the widget since it is
> something that affects the Look and Feel of the application.  ie
> font=sans or font=arial etc.  Should fonts be part of skins since they
> also affect buttons etc?
> 
> Should I post an enhancement?
> 
> Liz
> 
> -----Original Message-----
> From: Paul Spencer [mailto:pagameba at magma.ca] 
> Sent: September 2, 2004 9:36 AM
> To: Godwin, Elizabeth
> Cc: chameleon at lists.maptools.org
> Subject: Re: [Chameleon] Locate widget
> 
> 
> Liz,
> 
> can you try changing to another font that is in the font file?  Also, 
> please triple check that you are using the font file you think you are 
> using (i.e. change its name on disk and in the map file and make sure 
> that it still loads the map file ok).
> 
> Paul
> 
> Godwin, Elizabeth wrote:
> 
> 
>>I've discovered that the Locate widget (using cvs) fails when I'm 
>>using
>>it in my custom application. 
>> 
>>It fails when setting the font to "sans" on line 1051 ish in the Draw 
>>point function in Locate.widget.php.   At least, this is my assumption
> 
> 
>>as commenting out that line and the next one (set font type to 
>>Truetype)
>>makes the error go away.
>> 
>>Why might it fail here, when it works in the CVS samples?  I'm using 
>>the
>>same font files in the same ../etc/fonts.txt file setup as with the
> 
> samples.
> 
>> 
>>Also I've noticed that the error triggers one of my custom widgets to
>>open it's popup, thus causing more errors.
>> 
>>I've noticed postings on the throwing errors to popups, but not the
>>locate widget problem.  Anyone else experiencing this?
>> 
>>Cheers,
>> 
>>Liz Godwin
>> 
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org 
>>http://lists.maptools.org/mailman/listinfo/chameleon
> 
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



More information about the Chameleon mailing list