Opened 17 years ago

Last modified 13 years ago

#2469 assigned defect

minor centering errors with symbols and text

Reported by: richf Owned by: tbonfort
Priority: low Milestone: FUTURE
Component: MapServer C Library Version: svn-trunk (development)
Severity: minor Keywords:
Cc:

Description

This is a fairly nitpicking issue -- I'm talking about very minor placement issues here, like a pixel or two. Nevertheless, if you take a look at the examples here, sometimes the highway circle is slightly off center from the line, and sometimes the text within the circle is slightly off center from the circle. This is with "POSITION CC". It's easier to see if you look closer, for example with xzoom, or by examining the images in gimp.

There are instances visible with both GD and AGG rendering.

Test data is described in test.sql. It was imported into postgresql/postgis with:

psql <dbname> -f test.sql

And then test.{shp,shx,dbf} were created with:

pgsql2shp <dbname> test

Attachments (1)

symbolbug.zip (85.7 KB ) - added by richf 17 years ago.

Download all attachments as: .zip

Change History (4)

by richf, 17 years ago

Attachment: symbolbug.zip added

comment:1 by tbonfort, 17 years ago

Owner: changed from sdlime to tbonfort
Status: newassigned

the centering of the font labels is related to #2357

I'll have a look at the centering of pixmap symbols. unrotated and/or unscaled symbol images are placed at the closest integer pixel location to avoid the blurring that would occur if doing subpixel placement and the inherent bilinear filtering. therefore the exact centering of the symbols is probably related to the evenness (is that a word? I mean even vs. odd) of the image size

comment:2 by tbonfort, 15 years ago

Milestone: 6.0 release

pushing to 6.0 and the rendering api switch

comment:3 by tbonfort, 13 years ago

Milestone: 6.0 releaseFUTURE
Version: 5.0svn-trunk (development)

There still are some minor centering issues.

Addressing them is a difficult task, as for text and pixmap symbols, we align ourselves on the pixel grid whenever possible (i.e. when there is no scaling or rotation):

  • for pixmap symbols, to avoid the blurring that occurs due to bilinear resampling
  • for text, to take advantage of hinting provided by the backend font engine (i.e. freetype) (see: http://en.wikipedia.org/wiki/Font_hinting )

pushing to FUTURE

Note: See TracTickets for help on using tickets.