Hello Dave, I have received your documentation. This is a great job !!! You should think about updating the wiki with your notes.
About text_ratio can you give me an example because I am not sure of what you mean. Btw, you can update your definition as it is available in XML now. I will make a few more test to see if I can find out. B.R. Nicolas. -----Message d'origine----- De : David Eastcott [mailto:[email protected]] Envoyé : jeudi 18 février 2010 4:38 À : Nicolas Gillet Cc : [email protected] Objet : Re: [Mapnik-users] long text wrap. Hi, Not really sure how text ratio is supposed to work, but here are some additional notes about text/shield symbolizers that we part of the 0.7.0 release (from the change log): http://trac.mapnik.org/changeset/1254 http://trac.mapnik.org/changeset/1341 I have attached a pdf of a document I have been working on to organize and document MY understanding of the various Mapnik options. If it does not get thru the list filter let me know and I'll send it direct If anyone has any corrections, observations or comments, let me know. Best regards Dave Nicolas Gillet wrote: > 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 >> >> > > _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

