[UNCLASSIFIED]RE: [UMN_MAPSERVER-USERS] PDFLIB - using default Po stScript fonts
Antti Roppola
Antti.Roppola at BRS.GOV.AU
Wed May 3 17:07:09 PDT 2006
Hi Tom,
To achieve this a few versions ago, I modified mappdf.c to
always use Helvetica and not embed it. The first 16 PS type1 fonts
are to be supplied by the PDF client and need not be embedded
in the PDF file.
Here is a diff from MS 4.0.1, the last argument in the PDFLib
function is whether to embed the font, and you can see that in
MS 4.0.1, it was hard coded to "1" and therefore *always* embed fonts.
I just had a look in 4.8.1 and this still appears to be the case.
Diff output for 4.0.1, modified followed by original:
1391,1392c1363
< /* font = PDF_findfont(pdf, fontKey, "winansi",1); */
< font = PDF_findfont(pdf, "Helvetica", "winansi",0);
---
> font = PDF_findfont(pdf, fontKey, "winansi",1);
The non-lazy approach would have been to modify mappdf.c to
recognise type1 fonts in fontKey and set embed accordingly.
In pseudo-code something like:
if (fonKey in type1list) { embed=0;} else {embed=1;}
font = PDF_findfont(pdf, fontKey, "winansi", embed);
Cheers,
Antti
P.S. There are other economies to be made in PDF output if you
are willing to hack mappdf.c. For example, if you only want polygon
boundaries in one line type, you can set the boundary line style on
the polygon fill rather than rendering the polygon outline seperately.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On Behalf Of Tom Melhuish
Sent: Wednesday, 3 May 2006 8:56 PM
To: MAPSERVER-USERS at lists.umn.edu
Subject: [UMN_MAPSERVER-USERS] PDFLIB - using default PostScript fonts
I can not get the default postscript fonts in pdflib to display in mapserver (i.e. Times-Roman). I read the "PDF Output" document but don't see how to make the link to the default PostScript fonts that the document describes. I assume Label->Type->Times-Roman but this doesn't work. I am able to
----------------------------------------------------------------------
IMPORTANT - This message has been issued by The Department of Agriculture, Fisheries and Forestry (DAFF). The information transmitted is for the use of the intended recipient only and may contain confidential and/or legally privileged material. It is your responsibility to check any attachments for viruses and defects before opening or sending them on.
Any reproduction, publication, communication, re-transmission, disclosure, dissemination or other use of the information contained in this e-mail by persons or entities other than the intended recipient is prohibited. The taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error please notify the sender and delete all copies of this transmission together with any attachments. If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one advise the sender by return e-mail accordingly. Only e-mail correspondence which includes this footer, has been authorised by DAFF
----------------------------------------------------------------------
More information about the MapServer-users
mailing list