summaryrefslogtreecommitdiff
path: root/print/ghostscript-gnu/files/patch-src:gdevpdfw.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2008-09-05 19:41:48 +0000
committerHiroki Sato <hrs@FreeBSD.org>2008-09-05 19:41:48 +0000
commit6e0909e045a068d899c6347684796ba545f7202e (patch)
treee79848665db740cc8788eb18695e78e172bdef35 /print/ghostscript-gnu/files/patch-src:gdevpdfw.c
parentUpgrade to snapshot 2008.09.05 (SVN revision 73). (diff)
* print/ghostscript-* and related ports have been renamed in the
following way: print/ghostscript-gnu -> print/ghostscript7 print/ghostscript-gnu-nox11 -> print/ghostscript7-nox11 print/ghostscript-gnu-commfont -> print/ghostscript7-commfont print/ghostscript-gpl -> print/ghostscript8 print/ghostscript-gpl-nox11 -> print/ghostscript8-nox11 japanese/ghostscript-gnu-jpnfont -> print/ghostscript7-jpnfont korean/ghostscript-gnu-korfont -> print/ghostscript7-korfont * USE_GHOSTSCRIPT now supports a version number which the port requires. The valid value is "7" or "8". If other value is specified, value of WITH_GHOSTSCRIPT_VER is used. * WITH_GHOSTSCRIPT_GNU has been removed in favor of WITH_GHOSTSCRIPT_VER. The valid value of WITH_GHOSTSCRIPT_VER is "7" or "8", and the default value is "8". Approved by: portmgr (pav)
Notes
Notes: svn path=/head/; revision=219946
Diffstat (limited to 'print/ghostscript-gnu/files/patch-src:gdevpdfw.c')
-rw-r--r--print/ghostscript-gnu/files/patch-src:gdevpdfw.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/print/ghostscript-gnu/files/patch-src:gdevpdfw.c b/print/ghostscript-gnu/files/patch-src:gdevpdfw.c
deleted file mode 100644
index a08b87d42724..000000000000
--- a/print/ghostscript-gnu/files/patch-src:gdevpdfw.c
+++ /dev/null
@@ -1,60 +0,0 @@
---- src/gdevpdfw.c.org 2003-01-17 09:49:02.000000000 +0900
-+++ src/gdevpdfw.c 2003-09-25 17:50:54.000000000 +0900
-@@ -348,18 +348,19 @@
- /* Use the most common width as DW. */
-
- {
-- ushort counts[1001];
-+ ushort counts[1500*2]; /* histogram of (-1500..1500) */
- int dw_count = 0, i;
-
- memset(counts, 0, sizeof(counts));
- while (!psf_enumerate_glyphs_next(&genum, &glyph)) {
-- int width = ppf->Widths[glyph - gs_min_cid_glyph];
-+ int cid = glyph - gs_min_cid_glyph;
-+ int width = ppf->Widths[cid];
-
-- counts[min(width, countof(counts) - 1)]++;
-+ counts[max(0,min(width+countof(counts)/2,countof(counts)-1))]++;
- }
-- for (i = 0; i < countof(counts); ++i)
-+ for (i = 0; i < countof(counts); i++)
- if (counts[i] > dw_count)
-- dw = i, dw_count = counts[i];
-+ dw = i - countof(counts)/2, dw_count = counts[i];
- if (dw != 0)
- pprintd1(s, "/DW %d\n", dw);
- }
-@@ -496,14 +497,16 @@
- if (pdf_has_subset_prefix(chars, size))
- chars += SUBSET_PREFIX_SIZE, size -= SUBSET_PREFIX_SIZE;
- pdf_put_name(pdev, chars, size);
-- if (pef->sub_font_type == ft_CID_encrypted &&
-+ if ((pef->sub_font_type == ft_CID_encrypted ||
-+ pef->sub_font_type == ft_CID_TrueType) &&
- pef->cmapname[0] == '/'
- ) {
- stream_putc(s, '-');
- pdf_put_name_chars(pdev, (const byte*) (pef->cmapname + 1),
- strlen(pef->cmapname + 1));
- }
-- pprints1(s, "/Encoding %s", pef->cmapname);
-+ pprints1(s, (pef->cmapname[0] == '/') ? "/Encoding%s" : "/Encoding %s",
-+ pef->cmapname);
- pprintld1(s, "/DescendantFonts[%ld 0 R]",
- pdf_resource_id((const pdf_resource_t *)pef->DescendantFont));
- write_Widths = 0;
-@@ -563,8 +566,10 @@
- break;
- case -1:
- pdf_write_CIDFont_widths(pdev, pef);
-- if (pef->FontType == ft_CID_TrueType)
-- pdf_write_CIDToGIDMap(pdev, pef, &cidmap_id);
-+ if (pef->FontType == ft_CID_TrueType) {
-+ if (pef->embed != FONT_EMBED_NO)
-+ pdf_write_CIDToGIDMap(pdev, pef, &cidmap_id);
-+ }
- break;
- }
- if (pef->Differences) {
-