Seem's great to pull from CSS for these. Brings up the idea that  
perhaps we should pull some parameters that relate to text into true  
CSSParameters like the LineSymbolizer does for 'stroke' params:

http://trac.mapnik.org/wiki/LineSymbolizer#XML

Dane


On Aug 18, 2009, at 8:09 AM, Jochen Topf wrote:

> I recently looked at the CSS used in HTML for these kind of things.  
> Maybe it
> would make sense to rename the options along those lines. This  
> wouldn't
> change any functionality, just give them names that are similar to  
> what
> people are used to from other places.
>
> CSS uses:
> text-transform: none|uppercase|lowercase
> letter-spacing (instead of character-spacing)
>
> It uses line-height, but thats somewhat different in meaning than  
> line-spacing.
>
> Jochen
>
> On Tue, Aug 18, 2009 at 06:31:36AM -0700, Dane Springmeyer wrote:
>> Cc: Jochen Topf <[email protected]>
>> From: Dane Springmeyer <[email protected]>
>> To: mapnik-devel <[email protected]>
>> Subject: Re: [Mapnik-devel] Patch for improved text rendering
>> Date: Tue, 18 Aug 2009 06:31:36 -0700
>>
>> And I've updated the python bindings with these new options in r1288.
>>
>> Thanks Jochen!
>>
>> dane
>>
>>
>> On Jul 20, 2009, at 8:31 AM, Artem Pavlenko wrote:
>>
>>> Hi Jochen,
>>>
>>> Excellent stuff, I applied your patch in r1254. Thanks!
>>> Artem
>>>
>>> 2009/7/19 Jochen Topf <[email protected]>
>>> Attached is a patch for some text rendering improvements. The
>>> TextSymbolizer
>>> gets the following new parameters:
>>>
>>> * text_convert="none|toupper|tolower"
>>> Convert all text to upper/lower case before rendering. "none"  
>>> doesn't
>>> do
>>> anything with the text and is the default. Works for labels along
>>> lines
>>> or at points.
>>>
>>> * line_spacing="<number>"
>>> Add this many pixels space between two lines in text labels that  
>>> have
>>> been broken into several lines. Default is 0. Doesn't do anything  
>>> for
>>> labels along lines.
>>>
>>> * character_spacing="<number>"
>>> Add this many pixels space between two characters in a text. Default
>>> is 0.
>>> Currently only works for text labels on point geometries. This  
>>> should
>>> also be implemented for labels along lines, but I'll leave that for
>>> another day.
>>>
>>> * wrap_character="<character>"
>>> Instead of breaking text into lines on spaces, use this character.
>>> This
>>> is useful, when you want to make sure that labels are broken at the
>>> right
>>> spot. Note that you'll probably want to make wrap_width small so  
>>> that
>>> your lines are actually broken, otherwise you'll see the
>>> wrap_character
>>> in the output. Default is ' ' (space). Doesn't do anything for  
>>> labels
>>> along lines.
>>>
>>> I have added those parameters to the load_map and save_map functions
>>> and
>>> implemented the functionality. I have *not* added this to the python
>>> bindings, because I don't know how they work.
>>>
>>> Jochen
>>> --
>>> Jochen Topf  [email protected]  http://www.remote.org/jochen/
>>> +49-721-388298
>>>
>>> _______________________________________________
>>> Mapnik-devel mailing list
>>> [email protected]
>>> https://lists.berlios.de/mailman/listinfo/mapnik-devel
>>>
>>>
>>> _______________________________________________
>>> Mapnik-devel mailing list
>>> [email protected]
>>> https://lists.berlios.de/mailman/listinfo/mapnik-devel
>>
>
> -- 
> Jochen Topf  [email protected]  http://www.remote.org/jochen/   
> +49-721-388298
>

_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel

Reply via email to