-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi lines TextSymbolizer upside down #3857
Comments
I cannot reproduce it. Can you make a simple test case I can run? Something like visual test. |
Yes you're right, I should write a test case and test it. Will do it. But, sorry for my silly question, how to render the .xml? For example, I've done this py renderer but the image is empty.
|
You have to say which extent to render either by map.zoom_all() or by bbox = mapnik.Envelope(-1, -1, 1, 1)
map.zoom_to_box(bbox) |
Yes ! That's it. I think the poly is not big enough to enclose the multi lines text so the first line is rotated. I will make further tests to workaround this issue. Thanks again. The .xml file
The .py file
|
Thanks for the test case, I will try to take a look asap. |
One more question, what is your version of Mapnik? |
My Mapnik version is 3.1.0. As far as i remember, i've always seen this issue. |
It is strange that I cannot reproduce your rendering. Do you have some patches applied to your Mapnik? I have tried latest master, which is basically 3.1.0, and 3.0.18. Anyway, I think the problem is related to #2952. |
Yes I forgot it. We just revert the vertex_cache.cpp to avoid the not well centered multi lines. |
I have fixed it hopefully in mapycz@7721864. The problem is specific to your Mapnik with reverted #2953 so I cannot apply the fix to the upstream. The problem was following. Individual lines of multi line text are placed on offset lines, like depicted in the image below. The algorithm finds starting positions for each line by finding closest position on offset line from original line. It happened in the narrow part of the polygon, that algorithm found closest position on part of the offset line that goes to the opposite direction. The fix controls that directions of offset and original line in starting positions are about the same. |
Wonderful ! I'll test your fix. Thanks you so much. |
Hi Mapnik !
Sometimes with a TextSymbolizer and multilines text (Line1\nLine2\nLine3), the first line is near upside down, some rotation is applied, I don't understand why.
Please find the XML style code and an image to illustrate this.
Thanks for help.
The text was updated successfully, but these errors were encountered: