Opened 15 years ago
Closed 13 years ago
#2862 closed defect (invalid)
Bug in drawing curved ‘FOLLOW’ labels when displaying Chinese characters
Reported by: | nnikolov | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | 5.2 |
Severity: | normal | Keywords: | Chinese labels |
Cc: | tbonfort, dmorissette, aboudreault |
Description
When msPolylineLabelPath() is called in mapprimitive.c it fails because the sizes of the Chinese characters are not calculated correctly. It fails at:
/* If the difference between subsequent angles is > 80% of 180deg
bail because the line likely overlaps itself. */
if ( k > 2 && abs(theta - labelpath->angles[k-2]) > 0.4 * MS_PI ) {
*status = MS_FAILURE; goto FAILURE;
}
These sizes are obtained from the array offsets[] which is populated by calling msGetLabelSizeEx()
msGetLabelSizeEx() in maplabel.c gets the values to put into offsets[] from the function gdImageStringFTEx().
The code displays characters correctly if we force the values in offsets[] to be a reasonable fixed size.
We are using UTF-8 encoding for the Chinese characters, GD 2.0.33 and Mapserver 5.2
Change History (3)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Component: | GDAL Support → MapServer C Library |
Owner: | changed from | to
comment:2 by , 14 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
closing as no testcase was given, and the rendering changes have modified most of the underlying code affecting this issue.
please reopen or create a new bug if this issue is still relevant, and attach the mapfile and font used.
nnikolov, can you please provide a simple testcase (mapfile + data + request params) to reproduce this? Without that there is not much we can do.