Hello,
I up this thread as I have some news about text_ratio.
I cannot explain exactly how it works but for the first time I saw some
different behavior when changing it's value.
Here what I found :
When labeling points I set a wrap_width = 12 to force multi-line.
Then when I set a small text_ratio, the text was normally split but when I
increase it's value, the text wasn't wrapped anymore, it was written in one
line.
Knowing that and the comment I found in the source code ("text ratio for
bounding box in pixel") it becomes a bit clearer but it is not enough to
make out the actual way it works and edit the wiki yet.
If someone has some more info to share ...
Cheers
Nicolas.
Nicolas Gillet wrote:
>
> Hello,
>
> I would like to have some hints about how to use xml "text_ratio" and
> "wrap_width" attribute.
>
> I can't find any info. :'(
> e.g. I have a shape file with long city names (~25 characters) and words
> are separated by "-" in some cases.
> the "wrap_character" does not seems to exist (anymore ?) in text
> symbolizer.
>
> Can someone telle me more about this "wrap" and "ratio".
> What I found is :
> wrap_width :
> * Length before wrapping long names (found in wiki)
> * width to wrap text at, or trigger ratio (found in text_symbolizer.hpp)
>
> ->"lenght/width" ?! what width ? in pixel ? number of characters ? another
> unit ?
> -> "or trigger ratio" so there is a link between ratio and wrap_width ...
> I suppose
> -> think that when a text is bigger than this "length" something is done
> but what ?
>
> ratio :
> * ? (found in wiki)
> * target ratio for text bounding box in pixels (found in
> text_symbolizer.hpp)
>
> Not enough for my understanding of the basic way to use them.
> Whatever values I tried, I didn't see any change ... :'(
>
> What I would like to do, and I think it is possible, is to set very long
> names on several lines
> eg: my-very-long-name would be :
> my-very-
> long-name
> And I would like to know if it is possible to have such effect for a given
> polygon to make it so that the text will stay inside the polygon (e.g. the
> name of a park would stay inside park's geometry)
>
> Thank for any answer.
>
> Regards
>
> Nicolas
> Gillet
>
--
View this message in context:
http://old.nabble.com/long-text-wrap.-tp25471485p27625399.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users