Ticket #2862 (closed defect: invalid)

Opened 4 years ago

Last modified 2 years ago

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

Changed 4 years ago by tbonfort

  • cc tbonfort added
  • owner changed from warmerdam to sdlime
  • component changed from GDAL Support to MapServer C Library

Changed 3 years ago by dmorissette

  • cc dmorissette, aboudreault added

nnikolov, can you please provide a simple testcase (mapfile + data + request params) to reproduce this? Without that there is not much we can do.

Changed 2 years ago by tbonfort

  • status changed from new to closed
  • resolution set to invalid

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.

Note: See TracTickets for help on using tickets.