Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#2848 closed defect (wontfix)

AGG truetype marker symbol rotation should be around anchor point

Reported by: tbonfort Owned by: tbonfort
Priority: normal Milestone: 5.2.2 release
Component: AGG Version: 5.2
Severity: normal Keywords:
Cc: David.Fawcett@…, donald.kerr@…

Description

for marker symbols, truetype glyphs should be rotated around the center of their ink extent, and not their bottom left corner as for label text

Attachments (5)

sample-5_2_1.jpg (105.2 KB ) - added by sdlime 15 years ago.
5.2.1 Rendering (AGG)
sample-5_2_2.jpg (104.9 KB ) - added by sdlime 15 years ago.
5.2.2 Rendering (AGG)
road_shields.ttf (10.1 KB ) - added by sdlime 15 years ago.
Road shields truetype font.
CorrectlyRotatedOnPoing_AGGPNG24.gif (7.0 KB ) - added by DonaldKerr 13 years ago.
InCorrectlyRotatedOnPoing_PNG_GIF_JPEG.gif (2.1 KB ) - added by DonaldKerr 13 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by tbonfort, 15 years ago

Cc: David.Fawcett@… donald.kerr@… added
Milestone: 5.4 release5.2.2 release

comment:2 by tbonfort, 15 years ago

Resolution: fixed
Status: newclosed

fixed in 5.2 branch in r8400

fixed in trunk in r8180

by sdlime, 15 years ago

Attachment: sample-5_2_1.jpg added

5.2.1 Rendering (AGG)

by sdlime, 15 years ago

Attachment: sample-5_2_2.jpg added

5.2.2 Rendering (AGG)

comment:3 by sdlime, 15 years ago

Thomas: I'm doing some testing with the 5.2 branch and have run into trouble with TrueType fonts with labels. I've uploaded a couple of images, one from 5.2.1 and the other the from the 5.2 branch as it sits today. Both were compiled with the same switches and libs. Since this is the only ticket for 5.2 that looks to have touched that part of MapServer I'm reporting this here. Strangely the trunk doesn't suffer from the same alignment issues. Think it's just my setup?

The layer defs are pretty straight forward. The shields are a truetype font as are the labels. Layers are of type ANNOTATION.

Steve

by sdlime, 15 years ago

Attachment: road_shields.ttf added

Road shields truetype font.

comment:4 by sdlime, 15 years ago

I've confirmed there is a problem in the 5.2 branch with the following mapfile. I'll attach the font with the shields...

Steve

MAP
  EXTENT 0 0 100 100
  SIZE 100 100

  IMAGETYPE AGGPNG24

  FONTSET /usr/local/mapserver/fonts/fonts.list

  SYMBOL
    NAME 'state_highway'
    TYPE TRUETYPE
    FONT 'road_shields'
    CHARACTER '('
  END

  LAYER
    NAME TESTY
    TYPE ANNOTATION
    STATUS DEFAULT
    FEATURE POINTS 50 50 END END
    CLASS
      TEXT '50'
      STYLE  
        SYMBOL 'state_highway'
        COLOR 255 255 255
        OUTLINECOLOR 102 102 102
        SIZE 18
      END
      LABEL
        SIZE SMALL
        COLOR 0 0 0
      END
    END
  END
END

comment:5 by sdlime, 15 years ago

Think I found the problem. In 5.2 the code block:

  m_feng.hinting(true);
  m_feng.height(size);
  m_feng.resolution(96);
  m_feng.flip_y(true);
  font_curve_type m_curves(m_fman.path_adaptor());

was *after* the isMarker if-then section, but in 5.4 and trunk it is before that if-then. Moving it to match 5.4 and trunk resolved the issue. Committed in r8827.

Steve

comment:6 by DonaldKerr, 13 years ago

Resolution: fixed
Status: closedreopened

comment:7 by DonaldKerr, 13 years ago

The rotation of Truetype symbols on their centre point is fixed for AGG but I have just created other image formats (gif, jpeg, png256) and the problem persists with these renderers. (pdf format doesn't even rotate the symbol)

Apologies if this is the wrong way of reporting/dealing with this issue.

Donald

by DonaldKerr, 13 years ago

comment:8 by DonaldKerr, 13 years ago

Example images attached showing the correct rendering in AGG and incorrect for other formats.

Donald

comment:9 by tbonfort, 13 years ago

Resolution: wontfix
Status: reopenedclosed

All that code has been refactored for mapserver 6.0, closing. These issues will very probably not be addressed in the 5.x branches.

reopen a ticket assigned to me (Rendering API component) if the problems persist in the 6+ versions (what is now only in trunk)

comment:10 by DonaldKerr, 13 years ago

RFC 45 - "Symbology, Labeling, and Cartography Improvements" covers this and other improvements re ANCHORPOSITION etc., i.e. if RFC 45 is implemented then this should be resolved. Thanks. Donald

Note: See TracTickets for help on using tickets.