[mapserver-users] problem with truetype fonts.

Joseph4774 Joseph4774 at hotmail.com
Tue Apr 7 12:07:18 PDT 2009


Hi Everyone,
I have problem with location of truetype fonts when I choice outputFormat PDF .  It seems that with outputFormat PDF mapserver choices the lower left corner of the bounding box of the glyph and not the center center of the glyph.But everything works correctly when i change the outputFormat to PNG. 
I attached a folder with three test files to give more information about my problem. one is the true font Iam using for the test the secound one is the png file and the third is hte pdf file.
SendToPDFLib.zip 

I hope i've explained my problem well and iam sorry for my bad English.

Iam using csharp_script.dll .net solution and the PDFlib.dll for PDF output. and her is a part of the code that i user to generate pdf file map:

mapObj MSMap = new mapObj("mapfile");
outputFormatObj format = new outputFormatObj("pdf", "pdf");
MSMap.setOutputFormat(format);
imageObj img = MSMap.drawQuery();
img.save("imgFullPath", null);
img.Dispose();


and the test mapfile :


MAP

   NAME TEST
   STATUS ON
   SIZE 740 460
   EXTENT 693618 6171475 693855 6171703
   UNITS METERS
   FONTSET "/proj/Test/div/font.txt"
   
   IMAGETYPE png24

   OUTPUTFORMAT
     NAME png24
     DRIVER "GD/PNG"
     IMAGEMODE RGB
     EXTENSION "png"
   END

   OUTPUTFORMAT
     NAME jpeg
     DRIVER "GD/JPEG"
     MIMETYPE "image/jpeg"
     IMAGEMODE RGB
     EXTENSION "jpg"
   END
   
  WEB
	#
	# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root  
	# of the drive where the .MAP file resides.
	#
	  IMAGEPATH "/output"
	  IMAGEURL "/tmp/"
	#  LOG "/tmp/gmap.log"

	#  
	  METADATA 
		"TITLE" "Informationer på Kort, Morsø Kommune"
	  END
	END

	LAYER
		 GROUP Ledninger
		 NAME Ledning
		 TYPE LINE
		 STATUS ON
		 CONNECTIONTYPE OGR
		 CONNECTION "/proj/test/linie.TAB"
		 #STYLEITEM "AUTO"
		 CLASS
		   NAME ledninger
		   STYLE
		   COLOR 0 0 255
		   WIDTH 2
		   END
		 END
	   END	
	 
	 LAYER
     GROUP Knuder
     NAME Knuder
     TYPE POINT
     STATUS ON
     CONNECTIONTYPE OGR
     CONNECTION "/proj/Test/linie.TAB"
     CLASS
       NAME knuder
      
       STYLE
			COLOR 255 0 0
			OUTLINECOLOR 255 0 0
			#BACKGROUNDCOLOR 0 0 0
			SIZE 30
			Width 1
			SYMBOL "test01"		
	   END
       END
   END

SYMBOL
  NAME "test01"   
  TYPE TRUETYPE
  FONT elgraf2009
  POSITION CC
  FILLED false
  ANTIALIAS true
  CHARACTER "2"
END
END MAP

-- 
View this message in context: http://n2.nabble.com/problem-with-truetype-fonts.-tp2600843p2600843.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090407/a3f316f0/attachment.htm>


More information about the MapServer-users mailing list