2009-02-02T08:58:11.805173Z Ray Johnston

Fix broken bbox device caused by the 'fillpage' commit of rev 9288. This
resolves bug 690260 and other cases where the bbox was all 0's.

DETAILS:

When the 'RECT_IS_PAGE' check was removed, the BBOX_INIT_BOX function was
invoked unconditionally MUCH too often, leading to an empty bbox (0's)
which also caused the x11 device to not update many areas from the under-
lying image24 buffer to the screen. The 'BBOX_INIT_BOX' should only be
needed when the params change the geometry or when 'fillpage' is done.

[base/gdevbbox.c]

2009-02-02T08:52:01.582216Z Ray Johnston

Revert the patch of 9314 that caused a problem with the Ubuntu bug 160203
(https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/160203). This
patch appears to be a fix for a much older (~2004) version of gs and should
not be needed as of rev 8161 that resolved segfaults when there is a NULL
get_color_mapping_procs pointer. The mapping of 'black' and 'white' is
needed to properly allow for non-white painting in the bbox device to
avoid 0 0 0 0 BoundingBox.

[base/gdevbbox.c]

2009-01-30T21:10:55.690493Z Russell Lang

Add the default papersize module to the OS/2 build.

[psi/os2.mak]

2009-01-27T23:04:37.869301Z Ralph Giles

Update the directory listing the license for the source code
reorganization.

[LICENSE]

2009-01-27T22:40:23.384111Z Ralph Giles

Update internal copyright string.

[base/gscdef.c]

2009-01-27T21:00:23.120021Z Ralph Giles

Update changelogs and release dates for 8.64rc2.

[doc/History7.htm doc/Projects.htm doc/History8.htm man/dvipdf.1 man/ps2ascii.1 doc/Use.htm doc/Readme.htm doc/Source.htm doc/Deprecated.htm man/ps2epsi.1 doc/Install.htm doc/Changes.htm doc/API.htm doc/Issues.htm doc/DLL.htm doc/Drivers.htm man/pfbtopfa.1 doc/Release.htm doc/Commprod.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm man/gs.1 man/pf2afm.1 doc/Ps2ps2.htm doc/Fonts.htm man/printafm.1 doc/Ps2pdf.htm doc/Develop.htm doc/Helpers.htm man/pdf2dsc.1 doc/Psfiles.htm doc/Lib.htm doc/gs-vms.hlp man/font2c.1 man/gsnd.1 base/version.mak man/pdfopt.1 doc/News.htm man/pdf2ps.1 man/ps2pdf.1 doc/Make.htm doc/Details8.htm doc/Unix-lpr.htm doc/C-style.htm doc/Ps-style.htm doc/History1.htm doc/History2.htm man/gslp.1 man/wftopfa.1 doc/History3.htm man/ps2ps.1 doc/Details.htm doc/Ps2epsi.htm doc/History4.htm man/ps2pdfwr.1 doc/History5.htm doc/History6.htm]

2009-01-27T20:50:54.789641Z Ralph Giles

Update the release notes for 8.64rc2.

The x11alpha issue has been worked around.

Add some comments from Till Kamppeter.

[doc/News.htm]

2009-01-27T20:43:39.460217Z Ralph Giles

Fix fillpage in the x11alpha device.

This reverts an incorrect code change which prevented the fillpage
method of the x11alpha device from clearing the buffer. Bug 690255.

Details:

In r9288, a new fillpage method was added. This is a stub in printer
devices, but is overridden to detect page flushes in some high
level devices. That commit included incomplete changes to gdevxini.c
which didn't compile. Alex suggested a fix in 690202, which was
committed as r9294 after approval from the author of 9288. This was
what broke page clearing in the x11alpha device.

This commit removes the changes both commits made to the x11 devices and
restores gdevxini.c to its state prior as of r9287.

[base/gdevxini.c]

2009-01-27T20:43:37.567128Z Ralph Giles

Update documentation on the COMPILE_INITS makefile variable.
In particular, it's normally no longer 0.

Thanks to Ken Sharp for pointing this out.

[base/gs.mak]

2009-01-27T20:43:33.967975Z Ralph Giles

Escape significant characters when generating html changelog entries.

[toolbin/split_changelog.py]

2009-01-27T00:18:29.136711Z Ralph Giles

Remove $(GS_LIB)\Resource directory from the search path in the msvc 
build to shadowing the compiled in version.

GS_LIB is set in the Windows registery by the installer, but it does not 
currently install a duplicate copy of the Resource tree in the 
filesystem. Having this directory in the search path caused Ghostscript 
to use it for Resource lookup to the exclusion of the %rom% version, and 
since the files weren't installed there, Ghostscript would error out in 
the initialization phase.

Files like cidfmap and available fonts can still be overridden by 
putting them in $(GS_LIB)\lib and $(GS_LIB)\fonts.

Patch from Russell Lang.

[psi/dwsetup.cpp]

2009-01-26T19:25:28.295228Z Ralph Giles

Update changelogs for 8.64rc1.

[doc/Changes.htm doc/History8.htm doc/News.htm doc/Details8.htm doc/Details.htm]

2009-01-26T18:59:39.072673Z Ralph Giles

Release notes for 8.64rc1.

[doc/News.htm]

2009-01-26T18:05:53.102397Z Ralph Giles

Propagate release number and date to the documentation.

[doc/History7.htm doc/Projects.htm doc/History8.htm man/dvipdf.1 man/ps2ascii.1 doc/Use.htm doc/Readme.htm doc/Source.htm doc/Deprecated.htm man/ps2epsi.1 doc/Install.htm doc/API.htm doc/Issues.htm doc/DLL.htm doc/Drivers.htm man/pfbtopfa.1 doc/Release.htm doc/Commprod.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm man/gs.1 man/pf2afm.1 doc/Fonts.htm doc/Ps2ps2.htm man/printafm.1 doc/Ps2pdf.htm doc/Develop.htm doc/Helpers.htm man/pdf2dsc.1 doc/Psfiles.htm doc/Lib.htm doc/gs-vms.hlp man/font2c.1 man/gsnd.1 man/pdfopt.1 doc/News.htm man/pdf2ps.1 man/ps2pdf.1 doc/Make.htm doc/Details8.htm doc/Unix-lpr.htm doc/C-style.htm doc/Ps-style.htm doc/History1.htm doc/History2.htm man/gslp.1 man/wftopfa.1 doc/History3.htm man/ps2ps.1 doc/Ps2epsi.htm doc/History4.htm man/ps2pdfwr.1 doc/History5.htm doc/History6.htm]

2009-01-26T18:04:16.208144Z Ralph Giles

Bump release numbers and copyright dates for 8.64rc1.

[base/gscdef.c base/version.mak doc/News.htm psi/dwsetup.rc psi/winint.mak doc/Release.htm]

2009-01-26T18:02:43.525231Z Ralph Giles

Work around an issue with comment parsing in the pre.tcl release script.

My tclsh seems to be broken.

[toolbin/pre.tcl]

2009-01-26T18:02:41.107170Z Ralph Giles

Update the pre.tcl release script for the new source locations.

[toolbin/pre.tcl]

2009-01-26T18:02:37.633990Z Ralph Giles

Update the pre.tcl release script for the new gs_init.ps location.

The essential ps library files were moved from lib to Resource/Init for
clarity and simpler behavior with compile-inits.

[toolbin/pre.tcl]

2009-01-26T17:33:36.155851Z Ken Sharp

Fix (pswrite): Incorrect PageBoundingBox comment location

Details:
The new %%PageBoundingBox comment was being emitted between a %%BeginPageSetup and %%EndPageSetup comment pair, which was causing it to be ignored by CUPS.

Moved the bounding box in front of the page setup comment

[base/gdevpsu.c]

2009-01-26T17:16:47.546837Z Ken Sharp

Yet more tidying up in the batch file. Adds release builds to the solution, better directory handling, a usage comment in the batch file and, if invoked without parameters, a usage printout for the user.

[toolbin/msvcxml.bat]

2009-01-25T06:59:45.428302Z Ralph Giles

Make the GS_SPLIT_LIBS configure function only recognize -l at the start 
of an argument, to avoid false positives from hyphens inside linker 
arguments. Bug 690254.

[base/configure.ac]

2009-01-24T09:31:46.808669Z Ken Sharp

This batch file, to generate a MSVC solution for building GS, was invalidated by the source re-organisation, and the inclusion of the resources in a ROM file system.

Fixed various aspects so that it now works again, basically.

[toolbin/msvcxml.bat]

2009-01-24T09:05:50.373013Z Ken Sharp

Add a check when comparing clip paths to see if both are NULL. Silences a Coverity warning and one day might conceivably prevent a crash.

[base/gdevpdfd.c]

2009-01-23T22:53:02.093705Z Ralph Giles

Convert 24 bit RGB data to grayscale when printing in monochrome with
eplaser device. Previously the RGB data was sent as is, resulting in
a stretched and truncated page image.

Patch from Olaf Meeuwissen. Bug 690252.

[contrib/eplaser/gdevescv.c]

2009-01-23T19:04:40.484432Z Alex Cherepanov

Continue the the fix from rev. 9384, plug 2 more ways that caused multiple
inclusion of page objects into the linearized file. Bug 690140, customer 932.

[lib/pdfopt.ps]

2009-01-23T03:10:05.467096Z Ralph Giles

Use the page parameters set on the X11 device when called by Ghostview.

This patch allows gv to control the output page parameters, overriding
document and gs default settings. Since it has been tested in the
Debian distribution and is contingent on being wrapped by the viewer,
I consider it low risk.

Original patch by William Bader. Bug 688943.

[base/gdevxini.c]

2009-01-22T13:53:18.843673Z Ken Sharp

Initialise two uninitialised variables. Not thought to be a real problem, but worth making certain. Flagged by Coverity.

[base/gdevpsf1.c base/gdevpsfx.c]

2009-01-22T13:15:07.920292Z Ken Sharp

Check the return value of gdev_prepare_stroke. Another warning from Coverity.

[base/gdevps.c]

2009-01-22T02:53:01.653019Z Alex Cherepanov

Fix multiple inclusion of page objects referenced from beads array.
Bug 690140, customer 932.

[lib/pdfopt.ps]

2009-01-22T01:48:31.483983Z Ray Johnston

Fix for Segfault with tiffsep devics when a file has more than 64 spot colors
and uses transparency. Clean up indentations to C-style. Problem seen with
Bug 690157.

DETAILS:

The number of channels needed in the pdf14 device is one greater than the
number of separations, to allow for the alpha channel (gxblend.h) and the
'comps' variable needs to be at a gx_color_index size to avoid truncation.

Note that the output from tiffsep and psdcmyk is still incorrect -- there
is a gray background in the black channel that is not expected. Also, the
color swatches defined as Alternate colors do not appear in the output,
only the Separations and the device (process) colors.

Also note that this does not address comment #5 from bug 690157 since the
default behavior when the maximum number of separations is reached is to
silently use the Alternate color.

This patch is primarily designed to cure the segfault (buffer OOB) issue.

[base/gdevp14.c base/gxblend.h]

2009-01-22T01:17:35.554315Z Alex Cherepanov

Check for and skip null objects (and other junk) in the /Anots array.
Bug 690244.

[Resource/Init/pdf_main.ps]

2009-01-21T15:34:55.892148Z Ken Sharp

Add a couple of error return checks which were missing. Picked up by Coverity.

[psi/zcolor.c psi/zicc.c]

2009-01-19T11:13:05.930829Z Ken Sharp

Revision 8951 missed an important part of the fix for pswrite, emitting a %%PageBoundingBox for each
page of the output.

[base/gdevpsu.c]

2009-01-19T09:47:56.340575Z Ken Sharp

Fix (pswrite): %%BoundingBox comment geenration
   (ps2write): media selection and %%BoundingBox generation

Details:
bug #690236 "Ghostscript is not able to convert PDF to PostScript 
maintaining the input document's page sizes"

The pswrite bug is actually in the consuming applications, which are unable to 
process the media selection requests in the pswrite output and instead use DSC
comments to select the media. pswrite attempts to use the bbox deice to generate a
%%BoundingBox comment, but because this is a high-level device, no marks are made, so 
the BoundingBox is 0 0 0 0. 

Fixed by using the media size instead if this case is detected.


ps2write did not generate a %%BoundingBox, or any other DSC comment at all, because it
does not produce DSC PostScript (there is a request to address this already #690064).
Also the media selection in the ps2write output is disabled by default, forcing users
to find some means to set particular keys in userdict on the target device.

Fixed by emitting a %%BoundingBox equal to the media size of the first page (NB as
this is not DSC, other pages will be selected incorrectly if this is all the
application uses). Also allow the use of the /SetPageSize, /RotatePages and /FitPages
keys during ps2write processing to emit a PostScript file with these keys already
set, thus allowing media selection to take place without further user intervention.

[doc/Ps2ps2.htm base/gdevpdfx.h base/gdevpsu.c base/gdevpdfp.c base/gdevpdfu.c base/gdevpdfb.h]

2009-01-18T19:57:58.223740Z Alex Cherepanov

Fix SEGV in 'inferno' device caused by insufficient memory allocation. Pass
correct device type to prn_device_body() macro. thanks to Wendy for the patch.

[base/gdevifno.c]

2009-01-16T18:38:48.474888Z Ken Sharp

Fix (pdfwrite): Invalid metadata for PDF/A output

Details:
bug #690046 "Ghostscript doesn't produce valid PDF/A-1B files"

Now that we have an example file, the remaining issues are resolved:

1) The recommended tags for font metadata in the ISO spec are not present in the XMP schema, resulting in Acrobat preflight complaining. Distiller does not (and never has, apparently) write font metadata for PDF/A files, and the spec says only that files 'should' contain metadata. For now we disable writing font metadata to match Distiller.

2) When converting TrueType fonts into CIDFonts, for PDF/A compatability, we must also write a CIDSet resource. The code was creating and initialising a table containing an explicit 256 entries, but the CIDSet resource was writing as many entries as there are glyphs in the base font. If this was larger we wrote uninitialised data to the CIDSet. Altererd to create and initialise a table the size of the number of glyphs in the base font.

[base/gdevpdtd.c base/gdevpdfe.c]

2009-01-16T05:03:44.102465Z Ralph Giles

Move the font api bridge implementations to the psi directory.

Bug 690231, fixes the language switch build with ufst.

These are referenced from int.mak and depend on interpreter-level 
headers. So while the font api should be part of the graphics library, 
these files actually belong in the interpreter.

[psi/fapi_ft.c base/fapiufst.c psi/fapiufst.c base/fapi_ft.c]

2009-01-15T15:22:39.193218Z Ken Sharp

Update a comment to say why the minimum file size is 4KB

[lib/pdfopt.ps]

2009-01-15T15:20:15.993430Z Ken Sharp

Fix (pdfopt): Minimum optimised file size changed in Acrobat 9

Details:
bug #690210 "Inconsistent "fast web view' results"

It seems Acrobat 9 will decide that any file less than 4Kb in size is not optimised for fast web view, regardless of content. Previous versions of Acrobat insisted on a minimum of 1Kb.

[lib/pdfopt.ps]

2009-01-15T09:16:00.166572Z Ken Sharp

Fix (pdfwrite)

Details:
revision 9346 sets the about member of the XMP metadata to empty ("") unconditionally, this should only be done when writing PDF/A files.

[base/gdevpdfe.c]

2009-01-15T07:52:13.786371Z Alex Cherepanov

Fix compilation on Windows NT, which doesn't define LOCALE_IPAPERSIZE.

[base/gp_wpapr.c]

2009-01-14T22:58:56.327548Z Ralph Giles

Check for a null target_info in bbox_image_end_image before
trying to free it. Fixes bug 680019.

[base/gdevbbox.c]

2009-01-14T11:15:24.692365Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 7).

DETAILS :

Bug 690228 "pcl6 regression".

Don't write a pattern in the short form (just tile id)
to the "all bands" list if some bands don't store same tile id.
Otherwise those bands would be confused and try to call pattern_load,
which is not supported while a clist playback. 

[base/gxclpath.c]

2009-01-13T22:17:21.104569Z Alex Cherepanov

Return 0 when accessing Type1C font table out of range or the table is too
short and display a warning if possible. Bug 690050, customer 353.

DETAILS:
Old code smashed the stack when operator read was unsuccessful and failed
shortly afterwards. New code tolerates PDF files produced by 'Exstream
Dialogue', which have Type1C fonts with overlapping tables, which Ghostscript
shortens to non-overlapping length. Thanks to Ray for the origimal patch.

[Resource/Init/gs_cff.ps]

2009-01-13T18:38:37.869412Z Ray Johnston

Revert .outputattrkeys to the list prior to rev 8026 to fix problems with
Duplex introduced with that change. Bug 690041.

[Resource/Init/gs_setpd.ps]

2009-01-12T19:33:58.722824Z Ralph Giles

Fix a gcc warning in gxshade6.c.

When VD_TRACE is not defined, vdtrace.h defines most of its operations
as DO_NOTHING, but with was not done for vd_restore and vd_disable,
causing compiler warnings in gxshade6.c, where vd_disable is called
as the sole body of an if() statement.

Bug 690204.

[base/vdtrace.h]

2009-01-12T16:51:59.689070Z Ken Sharp

Fix (pdfwrite): Invalid metadata for PDF/A output

Details:
bug #690046 "Ghostscript doesn't produce valid PDF/A-1B files"

This does not, unfortunately, address some of the issues raised in the bug report,
without a sample PostScript file to work from these cannot currently be addressed.

However, there were significant problems with the XMP metadata being written:
1) The rdf attribute 'about' has changed, it is no longer recommended to use a UUID,
it should be left empty or formatted as a URI. Altered to empty.
2) The Adobe parser does not like mix and match of attributes and properties, if we
are setting properties, we can't use (at least some) attributes.
3) The preferred schema namespace prefix for the XMP basic schema is now 'xmp' not
'xap'.
4) Date syntax was incorrect for GMT. XMP specifies *either* 'Z' *or* +/-hh:mm. We
were writing 'Z00:00' (that is, both alternatives).

Also added support for the /Subject and /Keywords elements of the Document Info
dictionary, if these are present, as per the patch from Florian Haenel.

[base/gdevpdfe.c]

2009-01-10T22:11:18.954264Z Till Kamppeter

Add "-sstdout=%stderr" to scripts that call gs so that they don't corrupt their own output when outputing to stdout (Thanks to Dan Sheridan (djs at adelard dot com), Ubuntu bug #314439).

[lib/eps2eps lib/ps2pdfwr lib/ps2ps lib/ps2ps2 lib/dvipdf]

2009-01-09T08:53:40.554994Z Till Kamppeter

Added support for GNU Hurd (patch from Debian package).

[base/configure.ac]

2009-01-09T00:28:18.396434Z Ray Johnston

Correct very minor typo.

[Resource/Init/pdf_base.ps]

2009-01-08T21:28:55.852108Z Till Kamppeter

Small correction on ./configure magic for libpaper.

[base/configure.ac]

2009-01-08T12:51:35.348058Z Till Kamppeter

Added auto-detection for libpaper to the configure script

[base/configure.ac]

2009-01-08T12:43:28.851914Z Igor Melichev

Fix (TT font handler) : Wrong glyph posiitions with vertical writing mode (continued).

DETAILS :

Bug 689304 "improper handling of vertical japanese text".

This is fourth partial patch for the bug 689304.
It adds a code for processing CoverageFormat2,
which is used by IPAfont00203.

Besides that, in the old CoverageFormat1 code
subst.GlyphCount was used instead cov.GlyphCount . 
It didn't cause a problem because (we guess)
normally they are equal.

The field CoverageFormat2::RangeRecord is renamed into 
RangeArray to avoid possible conflict with same name for
a structure type. Rather it is a correct C,
we're not sure that all compilers accept it with no warning.

[base/gstype42.c]

2009-01-08T09:17:18.162362Z Russell Lang

Automatically select the default paper size from the locale
on the Windows platform, and make provision for doing this
on Linux.

DETAILS:
This adds a new platform function gp_defaultpapersize and a new 
operator .defaultpapersize.
In order of priority, the paper size is set from PAPERSIZE,
DEFAULTPAPERSIZE, .defaultpapersize, or the compiled in
device paper size.

It has been tested on Windows 98, XP and Vista.

[base/openvms.mmk base/lib.mak base/gp_paper.c doc/Use.htm doc/Develop.htm base/unix-aux.mak base/macos-mcp.mak psi/zmisc.c psi/os2.mak base/winlib.mak base/watclib.mak base/gp.h Resource/Init/gs_init.ps base/openvms.mak base/gp_upapr.c base/gp_wpapr.c doc/Language.htm]

2009-01-08T08:04:41.159684Z Russell Lang

Fix stackunderflow when specified PAPERSIZE is unknown.
Ghostscript will now use the device default page size when
PAPERSIZE is unknown.

[Resource/Init/gs_init.ps]

2009-01-07T17:36:55.528046Z Michael Vrhel

Fix for overprinting with transparency.  This fixes bugs related to the lack of overprint support when there is transparency present in the file. 

DETAILS: Previously if a sep device is used when processing a file that contains both transparency and overprinting, the overprinted colors would blow away the other sep colors.  In this commit, there was one fix to improper geometry in pfd14_cmykspot_put_image.  The remaining changes involved 1) passing overprint compositor actions to the pdf14 device, which occurs during the clist reading phase (in pdf14_create_compositor)  2) adding over_print and overprint mode to the pdf14 clist parameters (this follows the same process that is currently done for text knockout, blend mode etc) and 3) adding the actual fill support in pdf14_mark_fill_rectangle. 

EXPECTED DIFFERENCES:  In the regression tests Bug688631.pdf and Bug690206.pdf will have slight differences due to the blending of spot colors when the color space is subtractive. This matches what is seen in AR.

[base/gdevp14.c base/gdevp14.h base/gstrans.h]

2009-01-07T08:33:14.825057Z Ken Sharp

Fix (PDF Interpreter): Default Unicode decoding clashing with ToUnicode CMap

Details:
bug #690190 "Problem with -dProvideUnicode"

The ProvideUnicode switch creates a (read only) default Unicode decoding resource, presumably to use as a default ToUnicode Cmap when creating PDF files.

This interferes with PDF files which contain a real ToUnicode CMap, as the resource is read only and so cannot be updated with the content of the ToUnicode CMap.

Fixed by checking to see if the GlyphNamesToUnicode dictionary is writeable, and if it is not, creating a new one, when processing a ToUnicode CMap.

[Resource/Init/pdf_font.ps]

2009-01-06T14:38:01.194845Z Ken Sharp

Fix (pdfwrite): Missing glyphs in CIDFont causing errors.

Details:
Bug #690139: "Regression: Error writing PDF file: Missing glyph CID=0 in Bug689614.pdf".

When we find that a string in a PDF file uses a glyph which is not present in the current CIDFont we substitute the .notdef glyph (CID=0). However, if we do not have a width for the .notdef (this is the first missing glyph) we proceed to get one, and then attempt to run the CDevProc for the font.

This, unfortunately, attempts to use the original (missing) glyph, and so fails with a rangecheck error. Added a check to catch this condition and skip the CDevProc and caching.

Also improved the error message slightly.

[base/gdevpdtc.c]

2009-01-06T14:11:30.802229Z Igor Melichev

Fix (PDF interpreter) : A more explanatory message when a CID font is missing.

DETAILS :

Bug 688770 "/undefinedresource in --findresource--".

The patch prints which CID font is missing,
and a better explanation about CID font substitution and
about the related exit with error.  

[Resource/Init/pdf_font.ps]

2009-01-05T17:17:01.015629Z Marcos H. Woehrmann

Removed old code that failed in 2009.

[toolbin/bugsByEngineer.pl]

2009-01-05T14:02:04.227069Z Till Kamppeter

Added examples of PostScript files with CJK text

[examples/cjk examples/cjk/all_ag1.ps examples/cjk/iso2022.ps examples/cjk/all_aj1.ps examples/cjk/all_aj2.ps examples/cjk/all_ak1.ps examples/cjk/gscjk_ac.ps examples/cjk/iso2022v.ps examples/cjk/gscjk_ag.ps examples/cjk/gscjk_aj.ps examples/cjk/all_ac1.ps examples/cjk/article9.ps examples/cjk/gscjk_ak.ps]

2009-01-05T10:34:13.766328Z Till Kamppeter

Accidentally committed an obsolete patch. Reverted.

[base/gdevxini.c]

2009-01-04T20:20:47.824575Z Till Kamppeter

Fix sigbus/segfaults on sparc, hppa, etc. Debian bug 453903.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453903 for details.

[psi/store.h]

2009-01-04T20:15:19.267170Z Till Kamppeter

Improved man pages of ps2pdf.

[man/ps2pdf.1 man/de/ps2pdf.1]

2009-01-04T20:13:28.072664Z Till Kamppeter

Fixed syntax error in gs.css.

[doc/gs.css]

2009-01-04T20:11:57.725211Z Till Kamppeter

Assorted script fixes.

[lib/ps2epsi lib/dumphint lib/dvipdf]

2009-01-04T20:07:04.350954Z Till Kamppeter

Fix insecure script in toolbin.

[toolbin/pre.tcl]

2009-01-04T20:05:41.434499Z Till Kamppeter

Typo fixes in "gs" man page.

[man/gs.1]

2009-01-04T20:03:38.607601Z Till Kamppeter

Fix segfault in X device when page size changes.

[base/gdevxini.c]

2009-01-04T20:01:10.696570Z Till Kamppeter

Adjust the margins for Epson dot matrix printer drivers

[base/gdevepsn.c]

2009-01-04T19:58:54.777417Z Till Kamppeter

Fix a problem with Brother 7x0 GDI, contributed to Debian by B. Janssen.

[base/gdevhl7x.c]

2009-01-04T19:57:07.064594Z Till Kamppeter

Fix segmentation fault on -sDEVICE=bbox, contributed to Debian by Yaroslav Halchenko.

Original issue reported in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250290 and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=254877

[base/gdevbbox.c]

2009-01-03T22:45:50.335886Z Michael Vrhel

Debug raw dumping code that I have found useful in my debug of transparency and overprint issues.  

DETAILS : Open images with Photoshop in the raw format with the dimensions given in the file name.

EXPECTED DIFFERENCES :  None



[base/gxblend.c base/gxblend.h]

2009-01-03T19:51:08.451624Z Igor Melichev

Fix (graphics) : Incorrect bounds for clipping list.

DETAILS :

Bug 690060 "Regression: ball not round in Altona_Visual_1v2a_x3.pdf"

The bug persists since the repository was created. 
The revision 8020 brought an attempt to fix it,
but really it just replaced one wrong code with another wrong one.
Coding the right formula now.

[base/gxcpath.c]

2009-01-01T05:34:09.090806Z Alex Cherepanov

Continue to access the stream while reading a string (sgets()) until the
string is filled, EOF is reached, or an error occurs. Don't return after
first partial read. Bug 690152.

DETAILS:
Old code did this only for 1-byte reads, which commonly occur during
reading stdin one byte at a time. Repeated reading is now extended to
reads of any size.

[base/stream.c]

2008-12-30T18:58:17.371540Z Igor Melichev

Fix (garbager) : Wrong object marks when the object is freed by a garbager callback.

DETAILS :

Debugged on Vista x64 with running a 32 bits debug build of revision 9299 
with this command line :

..\..\gs-hd\bin\gswin32c.exe -IF:\AFPL\gs-hd\Resource\Init;f:\afpl\fonts -Z$?@ -r300 
       -dMaxBitmap=1000000  -dNOOUTERSAVE -sDEVICE=ppmraw -sOutputFile=out.ppm -dBATCH 
       -dNOPAUSE "H:\AuxFiles\CompareFiles\084-01.ps"  

1. The main change (gsalloc.c) :

The bug persists since the repository was created. 
When an object is freed after the garbager marking phase and before the
relocation phase, the heap consistency check misrecognizes it
as a free object pointed from an useful object. It happens because
the smark field was left unchanged ("marked") but the object status 
changed to 'freed', which must be unmarked.

In the test case such thing happens when a names subtable is freed
with this stack :
    i_free_object()  Line 721
    name_free_sub()  Line 541
    name_scan_sub()  Line 582
    names_trace_finish()  Line 416
    gs_gc_reclaim()  Line 371 

The patch resets the mark whenever i_free_object is called,
so that any freed object automatically becomes unmarked.
We could do it more delicate with checking whether a garbager
is on stack with a new special flag in gs_ref_memory_t,
but we don't see enough reasons for such complex check.

2. Minor change (igc.c) : 

Provide a right operand when gs_abort is called from  
gc_objects_set_reloc. The old code crashed due to dereferencing NULL.

[psi/igc.c base/gsalloc.c]

2008-12-29T18:25:08.338456Z Marcos H. Woehrmann

Script to print out open customer/P1/regression bugs by engineer.

Usage:  bugsByEngineer.pl >report.txt

[toolbin/bugsByEngineer.pl]

2008-12-29T06:43:42.727931Z Michael Vrhel

Fix for Bug 689895.  gx_put_blended_image_cmykspot was improperly inverting the alpha channel.   

[base/gxblend1.c]

2008-12-28T16:03:29.366807Z Alex Cherepanov

Use a proper destructor to free a file stream when access to the file is not
permitted in the safe mode, not just close the file and drop the rest of the
file structure. Bug 689975.

[psi/zfile.c]

2008-12-26T07:25:31.122671Z Alex Cherepanov

Fix 3 last cases of missing prototypes in MS Windows build.

[base/lib.mak psi/int.mak psi/zfcid1.c base/gxblend1.c base/gdevddrw.c]

2008-12-26T04:48:20.570500Z Alex Cherepanov

Remove the last 2 unused variables from Ghostscript code base.

[psi/dwtrace.c base/gdevdjet.c]

2008-12-24T20:33:22.470682Z Alex Cherepanov

Fix a buffer overflow in base font writer module of pdfwrite defice.
Allocate sufficient buffer for the worst case. Bug 690211.

[base/gdevpdtb.c]

2008-12-24T15:36:40.083208Z Ken Sharp

Fix (pdfwrite): Image with SMask fails when inside transparency group.

Details:
Bug #690139: "Regression: pdfwrite creates empty file".

The PDF Interpreter internally surrounds SMask images with an extra transparency group definition. If emitted to PDF this is invalid and causes Acrobat to complain. This was fixed in revision 6878 (bug 688767) by adding an extra parameter  'Image_with_SMask' to the dictionary.

The pdfwrite code checks for the existence of this in the group, and if present (and true) skips the transparency group begin. It also sets a flag in the device, to skip the end of the group as well.

However, the flag is only reset when a new transparency group is begun. If the SMask was nested inside a group then the flag remained set, causing the 'end' for all enclosing groups to be skipped as well. This caused empty output or, in extreme cases, a 'rangecheck' error in discardtransparencygroup, because we overflowed an internal stack.

We now set the device flag to false after we have skipped an end group.

[base/gdevpdft.c]

2008-12-23T09:05:30.676239Z Ken Sharp

Fix (pdfwrite): DSC comments interfering with Page Tree Orientation.

Details:
Bug #689922 "Rotation issues with pdfwrite and multiple operations".

When writing out a PDF file, pdfwrite adds /Rotate keys to individual pages, and if the document is gnerally rotated (eg landscape) will set a /Rotate key in the pages treee. This causes all pages which do not have their own value to inherit this as a default.

Unfortunately, the page tree code uses the same logic as the individual page, whch honours DSC '%%Orientation' and '%%ViewingOrientation' comments. If the last file processed contained one of these, this would become the default for all pages, regardless of their actual orientation. This would cause pages to be inappropriately rotated.

Fixed by clearing the DSC information before writing the orientation for the page tree, by this time all the pages that require it have already been written with their own value.

[base/gdevpdf.c]

2008-12-21T14:34:29.309508Z Igor Melichev

Fix (PS interpreter) : The operator 'gstate' leaked memory.

DETAILS :

Bug 689849 "gstate leaks memory"

The old code of gsave executes 'ref_save' without a clear reason. 
The patch disables it with #if 0.
For a while we keep the old code for an easier
understanding of an unexpected behavior difference, if any.
 

[psi/zdps1.c]

2008-12-21T07:46:52.896538Z Alex Cherepanov

Implement Algorithm 8.1 from PDF 1.6 Reference. Map /BBox of the appearance
stream transformed by /Matrix onto the annotation rectangle.
Bug 690195, customer 770.

[psi/zmatrix.c psi/int.mak Resource/Init/pdf_draw.ps]

2008-12-19T16:50:41.185072Z Ken Sharp

Fix: Problem with /DeviceN [/All].

Details:
Bug #690177 "Separation names become operator names.".

/DeviceN [/All] is technically illegal, but is allowed by Acrobat. We convert this to a /Separation /All colour space for compatibility. An error in the processing of this kind of space led to a string object being used in place of a name object to create the named space.

This led to 'peculiar' plate names instead of 'All', which caused no problems when rendering to CMYK (the alternate is used and sets all inks). However if rendering to a device with additional spot plates not alll plates would be marked as they should be for a /All space. Also pdfwrite produced incorrectly named plates in the output PDF file.

[psi/zcolor.c]

2008-12-19T01:53:18.887063Z Ralph Giles

Warn when the JPX ColorSpace key workaround is activated.

Details:

We don't use pdfformaterror because this is our failing, not the files.
But we call stderrprint to generate the output so it doesn't mangle
device output on stdout.

Suggested by Ray Johnston.

[Resource/Init/pdf_draw.ps]

2008-12-19T01:53:17.038875Z Ralph Giles

Assume unlabled JPXDecode streams are 8 bit DeviceRGB.

This is a work-around for bugs 688159, 689058 and 689509.

Details:

The PDF spec allows the ColorSpace and BitsPerComponent keys of a
JPXDecode filtered image dictionary to be left out, in which case
the interpreter is expected to obtain this information by examining
the stream.

This change does not implement that, but in most cases the image
is RGB, and 8 bits per component; assuming this format allows
correct rendering of all wild files we've seen of this type.

[Resource/Init/pdf_draw.ps]

2008-12-18T23:37:32.655756Z Alex Cherepanov

Change accessors to cmap data to support cmap subtables exceeding 64K-1 bytes.
Bug 690206, customer 870.

[Resource/Init/gs_ttf.ps]

2008-12-16T18:35:55.343539Z Ralph Giles

Fix a typo in commit r9288 which broke the X11 device build. Bug 690202.

Patch by Alex Cherepanov.

[base/gdevxini.c]

2008-12-16T17:52:13.417519Z Ralph Giles

Add the CVS directory to the romfs exclusion list. Bug 690205.

Details:

Currently the mkromfs script just includes the entire file tree under
Resource/ but the presence of any extraneous directories there confuses
the enumeration machinery. We have a exclusion for the .svn directory
so builds out of svn work, but apparently some people have a CVS mirror?

Anyway, it isn't difficult to add an additional exclusion for CVS
metadata. This isn't an issue for git, darcs or mercurial because they
keep all their repository data in the top-level directory.

[base/lib.mak]

2008-12-15T17:15:06.646171Z Ken Sharp

Enhancement (pdfwrite): Add support for the fillpage method.

Details:
The new fillpage device method can be used to detect occurences of erasepage more reliably (and probably more cheaply in performance terms) than the previous checks in the fill_rectangle methods. 

Removed the old code which checked the rectangle size against the page size, the colour against white, and the transparency stack depth, from the fill_rectangle methods. Added a new routine gdev_pdf_fillpage to implement the new fillpage device method.

[base/gdevpdfx.h base/gdevpdfd.c base/gdevpdfb.h]

2008-12-13T20:05:37.951803Z Igor Melichev

Enhancement (graphics) : Implement new device virtual method 'fillpage'.

DETAILS :

The new method improves the handling of 'erasepage' and 'fillpage'
for high level devices, bbox device. Also it is a preparation for
optimizing 'erasepage' for printer devices as for bug 690131.

When erasing a page, the old code passes fill_rectangle through
the device interface. However some devises need to recognize it
as a special high level operation and distinguish from an usual
rectangle filling. The old code implemented some trics for that.
This patch replaces the tricks with a strong logic for bbox device.
The pdfwrite device to be improved separately.

The old function gx_fillpage is now splitted into two parts,
one of which works before the device interface, and another one
after it. The second one looks as a default implementation
for the 'fillpage' device virtual method. Forwarding devices
implement new function gx_forward_fillpage.


[base/gdevrops.c base/gdevdflt.c base/gdevbbox.c base/gxcldev.h base/gxclipm.c base/gsovrc.c base/gxdevice.h base/gdevnfwd.c base/gspaint.c base/gdevddrw.c base/gxclip2.c base/gdevprn.h base/gdevp14.c base/gxdevcli.h base/gxclrect.c base/gdevxini.c base/gxclist.c base/gxclist.h base/gxclip.c base/gxclrast.c]

2008-12-13T16:54:17.751950Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 6).

DETAILS :

This is a further improvement for the bug 690133
"Regression: Ghostscript takes up all disk space when rendering eog or GIMP PDF output in 1200 dpi".
Also it is a preparation for a partial fix for the bug 690131 "Optimize consecutive setpagedevice". 

The last partch appears syntactically incorrect, now fixing.

[base/gxclpath.c]

2008-12-13T12:55:14.082194Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 5).

DETAILS :

This is a further improvement for the bug 690133
"Regression: Ghostscript takes up all disk space when rendering eog or GIMP PDF output in 1200 dpi".
Also it is a preparation for a partial fix for the bug 690131 "Optimize consecutive setpagedevice". 

The last partch wrongly distributed the saved pattern id for all bands
when writing a non-pattern color to all bands.
We believe it never happens the current revision with reasonable banding settings,
but fix fix it for code consistency and for avoiding problems
with further revisions.

[base/gxclpath.c]

2008-12-13T11:14:54.029422Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 4).

DETAILS :

This is a further improvement for the bug 690133
"Regression: Ghostscript takes up all disk space when rendering eog or GIMP PDF output in 1200 dpi".
Also it is a preparation for a partial fix for the bug 690131 "Optimize consecutive setpagedevice". 

This patch passes the coverage rectangle of a graphic element
for a better computation in cmd_put_drawing_color of the size 
would be consumed while serializing a color to clist
with copying to all covered bands.
When we need to force writing to all bands,
we pass a NULL instead the coverage rectangle.

[base/gxclpath.c base/gxclimag.c base/gxclrect.c base/gxclpath.h base/gxcldev.h]

2008-12-13T10:18:02.260144Z Ken Sharp

Fix (pdfwrite): Fonts with unusual FontMatrix generating incorrect FontBBox.

Details:
bug #689879 "wrong FontBBox in PDF file"

Fonts other than type 3 may not have a FontMatrix in PDF, these fonts are assumed to be on a 1000x1000 design grid. Most fonts already are, and embedded TrueType fonts are already catered for, but some unusual fonts have a non-standard (not [0.001 0 0 0.001 0 0]) FontMatrix. The matrix is accounted for when scaling the font, so the Tf operator is correct in the page content stream, but the FontBBox was calculated using the unscaled glyph outline.

We now scale the font outline into a 1000x1000 design grid before calculating the bounding box, so that the FontBBox entry will be correct.

[base/gdevpdtd.c]

2008-12-13T10:13:47.692668Z Ken Sharp

Fix (pdfwrite): Tidy up code.

Details:
Tidy up some code for bug #690118; When writing TrueType hmtx/vmtx, define a new function put_short which is functionally identical to put_ushort but doesn't truncate the sign bit. Use this instead of put_ushort when the value to be written may be negative. Add 0.5 to the floating point calculations and floor() the result so that we get the nearest approximation to the float when writing out the short.

A small number of files exhibit a number of single pixel differences in position or rendering of glyphs with this change. In all cases comparing the rendered result of the new PDF file with the rendered result of the original file shows no differences, so I consider these to be progressions.

[base/gdevpsft.c]

2008-12-10T19:10:43.669416Z Ralph Giles

Set standard properties on pdf_main.ps. Bug 690198.

[Resource/Init/pdf_main.ps]

2008-12-10T07:29:39.713832Z Igor Melichev

Fix (PDF interpreter) : Avoid extra erasepage, part 1.

DETAILS :

This is the first partial fix for the 
bug 690131 "Optimize consecutive setpagedevice".

The PDF interpreter calls extra setpagedevice for initializing the number of spot colors.
First it happens in pdfshowpage_setpage, and we merge that call
with another one that sets other multiple page parameters. 
Second in pdfshowpage_finish we replace it with .setpagedevice, 
which doesn't call .postinstall that calls erasepage.

[Resource/Init/pdf_main.ps]

2008-12-09T17:30:40.898715Z Marcos H. Woehrmann


Fix for weird math issue under AIX that cause problems in glpyh spacing when
writing type42 fonts for ps2write and pdfwrite.

This fixes bug 690118.

Details:

For reasons that I don't undertand under AIX (ushort) (double * double)
produces a 0 if the first double is > -1 and < 0 (and the sum is < -1).
Presumably the cast happens before the multiplication, but this isn't
reasonable and doesn't occur on other operating systems, even running
the same version of gcc.  Temporarily assigning the sum to a float and
then casting to a ushort resolves the problem.

The temporary assignment should be removed by the optimizer, so there
shouldn't be a performance hit (I did check, the optimized code is still
correct under AIX).


[base/gdevpsft.c]

2008-12-09T08:45:20.654566Z Ken Sharp

Fix (pdfwrite): regression with type 3 fonts using show charpath stroke combinations.

Details:
bug #690196 "regression: file for bug 689687"

The recent changes for text rendering modes caused a regression with Quark's type 3 font for special text effects, when optimising a show followed by charpath stroke into a single 'Tj' with a text rendering mode of 2 in the resulting PDF file.

Fixed by ceasing to treat type 3 fonts specially and applying the same optimisation as for other font types. A couple of other Quark files exhibit very small differences, comparing these to the rendered output of the original files the new result seems closer to the original. (ie a progression)

Also resolved a compiler warning.

[base/gdevpdtc.c base/gdevpdfd.c]

2008-12-09T08:01:43.121661Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 3).

DETAILS :

Bug 690133 "Regression: Ghostscript takes up all disk space when rendering eog or GIMP PDF output in 1200 dpi".

When filling a path with a pattern, the old code
stores the pattern to all bands that are covered with the path.
If the pattern is represented with a long clist, 
it consumes too big memory for the page clist.

If the pattern is big, the new code writes it 
to the "all bands" list instead replicating it to bands. 
Therefore the overall memory is smaller.

The decision about storing a pattern to "all bands"
should also depend on the number of bands.
This patch doesn't account that because current data flows
don't pass the number of bands to the point where
the decision must be taken. It may need a further improvement.

The threshold for "big" pattern is arbitrary set to 1Mb.
It may need an improvement also. It's another threshold 
than one for representing a pattern as a raster or a clist.

[base/gxclpath.c base/gxclutil.c base/gxcldev.h]

2008-12-09T07:58:55.697280Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued 2).

DETAILS :

This patch is important for the bug Bug 690133 
"Regression: Ghostscript takes up all disk space when rendering eog or GIMP PDF output in 1200 dpi",
but it is not restricted with its case.

When writing a pattern color to a band,
the old code uses the "saved color" structure
for remembering which color has been stored for the band.
In the case of pattern it stores the client's pattern id.
However it doesn't provide enough resolution because
a client's pattern may be instantiated with various CTMs.
The new code uses the pattern tile id to distinguish the pattern instances.

We're not sure why saved color structure stores the client's pattern id only.
It should be so for pdfwrite, but need to check whether other
cases are possible. Therefore the current change is kind of hackish.
See comment in code.

[base/gxclpath.c]

2008-12-08T08:17:55.714566Z Ken Sharp

Fix (pdfwrite): Large type 1 or 2 fonts caused errors with text.

Details:
bug #690144 "Files render properly with gs, but are misformatted in ps2pdf"

Revision 8235 added support to pdfwrite for type 0 fonts with type 1 or type 2 (CFF) descendant fonts, emitting these as subsets of the original instead of rendering the glyphs and embedding type 3 fonts with bitmap images. This results in better quality and smaller files.

However type 1 or 2 fonts which are too large for an arbitrary Ghostscript limit (> 65537 glyphs) can not be copied. This 'should' have fallen back to the old mechanism, but some data had been altered which led to this failing.

The fix for this comprises 3 parts:

1) Mmodified scan_cmap_text to save the data we modify for subsetting, and restore it if pdf_obtain_font_resource_unencoded fails, which then falls back to the 'default' type 3 mechanism (in case of future problems in this area). 

2) Increased the limit of glyphs (for type 1 or 2 fonts) in gs_copy_font. Added a new parameter 'max_reserved_glyphs'. If this is -1 then we reserve enough space for the number of glyphs in the original font. Otherwise we reserve space for the specified maximum. This limit only applies to font type 1 or 2, and is used by pdfwrite to avoid making excessively large font copies.

3) Modified pdf_base_alloc so that if the font is large (and is not one of the standard 13 fonts), we don't allocate a complete copy for our 'subset', we only allocate as many glyphs as will fit in a standard Encoding, 256, plus  one for the required .notdef making 257 in total. We also avoid making a second 'complete' copy of the font, because we will never write the complete font.

[base/gdevpdtb.c base/gxfcopy.c base/gdevpdtc.c base/gxfcopy.h]

2008-12-05T07:39:06.671710Z Alex Cherepanov

Check the whole Decode array to detect special cases of identity and inverse
decoding. Previous test analyzed every channel separately and misidentified
decoding arrays like [0 1 1 0 0 1]. Bug 690178.

[base/gxipixel.c]

2008-12-05T04:44:51.989860Z Alex Cherepanov

Adds special, tolerant to singular matrix processing, to the case when
ImageMatrix is differs from the CTM by the translation vector only, which
happens in cached character rendering. The patch clears PostScript errors
during text rendering with singular CTM. Bug 690179, customer 870.

[base/gxipixel.c base/gsimage.c base/gxccache.c]

2008-11-29T14:33:26.712726Z Alex Cherepanov

Ignore /ToUnicode attribute when it points to an object other then a stream.
Bug 680138.

[Resource/Init/pdf_font.ps]

2008-11-29T12:27:04.428583Z Till Kamppeter

The pstopxl CUPS filter did not remove its temporary file.

[cups/pstopxl.in]

2008-11-27T15:05:37.010932Z Ken Sharp

Fix (pdfwrite): more issues with PDF Text rendering modes.

Details:
Bug #689692 Colour and linewidth is not set correct for text with rendermode STROKE
and FILLSTROKE
Bug #Bug690025 pxlmono driver prints some glyphs as squares when the input is PostScript generated by Ghostscript

This follows on from revision 9196 and further addresses problems with PDF text rendering modes. Fundamentally the problem is that the PDF text matrix (Tm) should not affect the stroke width. However PostScript only has one transformation matrix, so when we get a Tm, the PDF interpreter modifies the CTM accordingly. This alters the (effective) stroke width, resulting in incorrect output.

This patch modifies the CTM before executing a stroke in modes 2 & 6, and for mode 1 modifies the stroke width by calculating what it would have been if the CTM were the identity at the time the text block began. Since pdfwrite emits text in an identity CTM, this corrects the problem.

The pdfwrite code for combining show/charpath/stroke operations into a single text rendering mode has been modified to expect the CTM to be correct, and to utilise it, when emitting the combined operation.


[Resource/Init/pdf_ops.ps base/gdevpdts.c base/gdevpdfd.c base/gdevpdts.h base/gdevpdfg.c]

2008-11-27T05:20:05.725774Z Alex Cherepanov

Use the same name (/PDFType3Untitled) for all Type 3 fonts without /FontName
attribute. PDF interpreter doesn't need unique names and the previous attempt
to generate unique names didn't work. Bug 689358.

[Resource/Init/pdf_font.ps]

2008-11-27T01:58:54.354925Z Alex Cherepanov

Restore language level after loading pdfwrite.ps for consistency and
compatibility with PS utilities. Also pick a few nits that may cause errors
if some of start-up files ever loaded in level 1 mode. Thanks to SaGS
for the patch. Bug 688151.

[lib/pdfwrite.ps Resource/Init/gs_dpnxt.ps Resource/Init/gs_cff.ps]

2008-11-25T17:19:23.759068Z Till Kamppeter

Fixed paper tray selection for the PCL 4/5/5e drivers (bug 690182). Works fine now with "-dMediaPosition=..." and for all possible trays. Needs review to see whether it does not break anything else.

[base/gdevdjet.c]

2008-11-24T23:04:21.969628Z Alex Cherepanov

Skip everything before 'begincodespacerange' in ToUnicode CMap stream
to avoid PostScript errors in CMap headers. PDF interpreter doesn't
need any data from the header. Bug 689842, customer 870.

[Resource/Init/pdf_font.ps]

2008-11-24T19:15:04.507271Z Till Kamppeter

Fixed input tray selection support in the PCL-XL drivers ("pxlmono"/"pxlcolor"), fixes on CUPS filter and PPDs to make input tray selection actually work.

[base/gdevpx.c cups/pstopxl.in cups/pxlmono.ppd cups/pxlcolor.ppd]

2008-11-24T11:01:42.358113Z Till Kamppeter

Made the CUPS filters and PPDs for PCL-XL also work with PDF as input data format

[cups/pstopxl.in cups/pxlmono.ppd cups/pxlcolor.ppd]

2008-11-23T20:36:12.040586Z Igor Melichev

Fix (CID font emulation) : CID from another writing mode rendered a wrong glyph (continued)

DETAILS :

This improve3s the second partial fix for Bug 689304  
"improper handling of vertical japanese text", related to Comment #30, #31. 

The revision 9213 appears buggy.
When a SubstCID resource is not available,
the stack balance is broken.

[Resource/Init/gs_cidtt.ps]

2008-11-21T14:24:21.693040Z Till Kamppeter

The "cups" output device was logging way to much in CUPS' debug logging mode. Moved some logging to debug2.

[cups/gdevcups.c]

2008-11-21T05:31:10.447898Z Alex Cherepanov

Add a check for bogus '>>' after 'endstream' to recover files generated 
by 'Kroll Background Screening'. Bug 690161.

[Resource/Init/pdf_base.ps]

2008-11-20T21:11:09.954526Z Alex Cherepanov

Move validation of the page tree after installation of the decryption handler
because access to encrypted xref streams needs decryption. Fix regression
introduced by the rev. 8933. Bug 690175.

[Resource/Init/pdf_main.ps]

2008-11-20T19:31:36.700423Z Ralph Giles

Add AES support to the pdf interpreter.

This commit adds convenience wrappers around the aes stream
implementation to pdf_sec.ps, and calls them when appropriate,
based on the crypt filter methods defined in the file Trailer's
Encrypt dictionary. Bug 688958.

It also includes comment and whitespace cleanup.

[Resource/Init/pdf_sec.ps]

2008-11-17T19:43:47.727833Z Alex Cherepanov

Add missing initialization of read_id field in reusable streams.

DETAILS:
This error was detected by Valgrind. I don't have any samples where this fix
affects the output.


[psi/zfrsd.c]

2008-11-17T10:41:13.803460Z Ken Sharp

Fix (pdfwrite): Not considering all glyphs in a string when noting first/last character

Details:
Bug 690166: extra space after apostrophe when distilled
Revision 8235 added support for type 0 fotns with type 1 or 2 descendants, this required using pdf_adjust_first_last_char so that we correctly noted the used glyphs, and stored their widths.

An oversight in calling the function resulted in only the first glyph in the string being considered.

[base/gdevpdtc.c]

2008-11-16T14:47:49.851717Z Igor Melichev

Fix (PS interpreter) : Eliminate unuseful transfer of left side bearing to type42_finish.

DETAILS :

This change is algorithmically equivalent.

type42_finish never uses lsb data that could be passed to it via
operand stack from some clients. This patch removes those data
and related arguments of some C functions.

[psi/zchar42.c psi/zchar42.h psi/zchar.c]

2008-11-16T12:15:46.619814Z Igor Melichev

Fix (TT font handler) : Wrong glyph posiitions with vertical vcriting mode.

DETAILS :

Bug 689304 "improper handling of vertical japanese text".

This is third partial patch for the bug 689304.
The old formulas were obtained impirically and don't
give the right result. The new ones are coded with a better understanding
of the problem. See comments in code for more details. 

Rather the patch closes the bug, we want to do some additional
equivalent changes for cleaning the code. Another patch coming soon.

[psi/zchar42.c]

2008-11-15T14:07:27.807825Z Ken Sharp

Fix PS interpreter: issues with ICCBased spaces

Details:
Bug #690169 Regression: seg fault reading  Bug689830.pdf, Bug689831.pdf, and annots.pdf

The 9218 revision to restore the 'optional' nature of the Alternate in ICCBased colour spaces was unfortunately incomplete. This led to us trying to set a 'null' colour space when a PDF file had a damaged and unusable ICC specification.

We now use the technique specified in the PDF Reference, take the value of 'N' from the space and use that to select an appropriate alternate, when one is not specified.

[psi/zcolor.c]

2008-11-13T14:23:05.749468Z Alex Cherepanov

Skip null entries in /Annots array. Bug 690161.

[Resource/Init/pdf_main.ps]

2008-11-13T02:02:49.620374Z Ray Johnston

Revert 8.63 behavior where the /Alternate key/value pair in ICCBased param dictionaries
is optional. Bug 690165 for customer 850.

DETAILS:

This allows:

[ /ICCBased << /N 3 /DataSource (srgb.icc) (r) file >> ] setcolorspace

to work, where srgb.icc is the path to an 'input' ICC color profile.

Until Ghostscript has support for ICC profiles throughout, this is useful to
allow for setting the Resource/ColorSpace/Default*** colorspaces (or
defining the ColorSpace resources) using ICC profiles.

[psi/zcolor.c]

2008-11-10T19:01:57.531817Z Igor Melichev

Fix (clist writer) : A crash when transparent object appears over the page top.

DETAILS :

Bug 690149 "PDF-file can not be converted".

The transparency compositor cropping caused an attempt to
Write to a non-existing band over the page top.
This patch skips writing such compositor commands. 


[base/gxclimag.c]

2008-11-09T20:38:08.817663Z Igor Melichev

Fix (CID font emulation) : CID from another writing mode rendered a wrong glyph (part 2).

DETAILS :

This change fixes the previous change's commitment error.
This log message describes the union of the 2 changes.

This is a second partial fix for Bug 689304
"improper handling of vertical japanese text", related to Comment #30, #31.

When emulating a CID font with an Open Type font, a CID is first
mapped to an OpenType encoding and then to a glyph index.
However OpenType provides same character codes for glyph variants,
which render differently depending on writing mode.
The glyph '(' is an example.

This patch works for OpenType fonts only, which provide a GSUB for vertical 
writing mode.
It is not working for True Type collections with no GSUB.
They need a further improvement.

The patch assumes that all interpreters initialize a Type 42 font with 
zeroing all its fields.
Postscript interpreter does so since a long ago, but we're not sure about 
others.
They may need an improvement.

1. Define a new resource category SubstCID (Resource/Init/gs_ciddc.ps).

2. Provide a tool for generating resources for that category 
(toolbin/GenSubstCID).

3. Provide resources for various orderings (Resource/SubstCID/CNS1-WMode,
Resource/SubstCID/GB1-WMode, Resource/SubstCID/Japan1-WMode, 
Resource/SubstCID/Korea1-WMode).

4. When loading a TrueType or OpenType font for a CID font emulation, 
associate an
appropriate SubstCID resource to it (Resource/Init\gs_cidtt.ps).
(We do associate the resource with TrueType hoping that some
True Type fonts may provide GSUB).

5. Define a new structure gs_subst_CID_on_WMode_s for storing that 
information
for the graphics library (base\gxfcid.h), and its garbager descriptor 
(base/gsfcid.c).
Since it may duplicate for several fonts, it is shared and 
reference-counted.

6. The new function get_subst_CID_on_WMode loads the resource data for the 
graphics library
in psi\zfcid1.c . Note it is implemented for PS interpreter only.

7. Generalized gs_type42_substitute_glyph_index_vertical with providing a 
CID in base/gstype42.c
and made it be a virtual function of gs_font_type42 (base/gxfont42.c).
We're not sure how other interpreters initialize the font, so
we're checking it for NULL for safety and use 
gs_type42_substitute_glyph_index_vertical
as a default implementation.

8. font11_substitute_glyph_index_vertical is another implementation of that 
function, which
accounts gs_subst_CID_on_WMode_s data for providing a right glyph depending 
on WMode.
Rather a SubstCID resource provides a substitution, currently
we only use the fact that a CID is substituted, and never use
the substituting CID. Nevertheless we prefer to define and store the 
resource
in the complete form for possible improvements in future (zfcid1.c).

9. release_subst_CID_on_WMode automatically releases the resource data
when all fonts (that use it) are released.

10. Added SubstCID to the ROM file system in psi/psromfs.mak .

11. Minor unrelated fix : propagate errors from gs_font_notify_register for 
(7) in base/gstype42.c .

[psi/zchar42.c Resource/Init/gs_ciddc.ps Resource/Init/gs_cidtt.ps psi/int.mak psi/zfcid1.c psi/zfont42.c]

2008-11-09T19:09:30.285684Z Igor Melichev

Fix (CID font emulation) : CID from another writing mode rendered a wrong 
glyph (part 1).
This revision is incomplete due to a commitment error. Please use next 
revision.

DETAILS :

This is a second partial fix for Bug 689304
"improper handling of vertical japanese text", related to Comment #30, #31.

When emulating a CID font with an Open Type font, a CID is first
mapped to an OpenType encoding and then to a glyph index.
However OpenType provides same character codes for glyph variants,
which render differently depending on writing mode.
The glyph '(' is an example.

This patch works for OpenType fonts only, which provide a GSUB for vertical 
writing mode.
It is not working for True Type collections with no GSUB.
They need a further improvement.

The patch assumes that all interpreters initialize a Type 42 font with 
zeroing all its fields.
Postscript interpreter does so since a long ago, but we're not sure about 
others.
They may need an improvement.

1. Define a new resource category SubstCID (Resource/Init/gs_ciddc.ps).

2. Provide a tool for generating resources for that category 
(toolbin/GenSubstCID).

3. Provide resources for various orderings (Resource/SubstCID/CNS1-WMode,
Resource/SubstCID/GB1-WMode, Resource/SubstCID/Japan1-WMode, 
Resource/SubstCID/Korea1-WMode).

4. When loading a TrueType or OpenType font for a CID font emulation, 
associate an
appropriate SubstCID resource to it (Resource/Init\gs_cidtt.ps).
(We do associate the resource with TrueType hoping that some
True Type fonts may provide GSUB).

5. Define a new structure gs_subst_CID_on_WMode_s for storing that 
information
for the graphics library (base\gxfcid.h), and its garbager descriptor 
(base/gsfcid.c).
Since it may duplicate for several fonts, it is shared and 
reference-counted.

6. The new function get_subst_CID_on_WMode loads the resource data for the 
graphics library
in psi\zfcid1.c . Note it is implemented for PS interpreter only.

7. Generalized gs_type42_substitute_glyph_index_vertical with providing a 
CID in base/gstype42.c
and made it be a virtual function of gs_font_type42 (base/gxfont42.c).
We're not sure how other interpreters initialize the font, so
we're checking it for NULL for safety and use 
gs_type42_substitute_glyph_index_vertical
as a default implementation.

8. font11_substitute_glyph_index_vertical is another implementation of that 
function, which
accounts gs_subst_CID_on_WMode_s data for providing a right glyph depending 
on WMode.
Rather a SubstCID resource provides a substitution, currently
we only use the fact that a CID is substituted, and never use
the substituting CID. Nevertheless we prefer to define and store the 
resource
in the complete form for possible improvements in future (zfcid1.c).

9. release_subst_CID_on_WMode automatically releases the resource data
when all fonts (that use it) are released.

10. Added SubstCID to the ROM file system in psi/psromfs.mak .

11. Minor unrelated fix : propagate errors from gs_font_notify_register for 
(7) in base/gstype42.c .

[Resource/SubstCID/CNS1-WMode base/gxfcid.h Resource/SubstCID base/lib.mak Resource/SubstCID/GB1-WMode Resource/SubstCID/Japan1-WMode base/gsfcid.c base/gxfont42.h psi/psromfs.mak base/gstype42.c toolbin/GenSubstCID.ps Resource/SubstCID/Korea1-WMode]

2008-11-07T18:49:34.403723Z Ralph Giles

Remove a duplicate typedef for stream_arcfour_state.

Details:

The duplicate (opaque pointer) typedef in gdevpdfx.h was
redundant and any users that dereferenced members or allocated
the struct on the stack already included sarc4.h.

I believe the idea here was just to hide the structure details
from some hypothetical user of the pdf_crypt api. However, the
stream state structure should either be opaque, with only the
typedef in sarc4.h or it should be public and using it requires
sarc4.h. The duplication isn't justified in either case.

Since stream state structures generally are public so they can
be stack-allocated, we decided to remove the duplicate typedef.

Also adds a missing dependency to the makefile.

Issue originally reported by the coverity hfa checker.

[base/gdevpdfx.h base/devs.mak]

2008-11-06T23:51:27.600449Z Marcos H. Woehrmann

Updates to nightly regressions to allow them to run under Mac OS X.  

Details:

Change uname parameters from '-m -o' to '-m -s'
Don't appened ".db" to filename when opening database.
Replace sendmail python function with call to /usr/bin/sendmail.
Archive daily rasters.
Change location of gscdef.c from src to base.
Call time from /usr/local/bin (/usr/bin/time doesn't take -f option).

Note that some of these changes are not compatible with peeves.

[toolbin/tests/make_baselinedb.py toolbin/tests/gscheck_raster.py toolbin/tests/testdiff.py toolbin/tests/compare_checksums.py toolbin/tests/gscheck_pdfwrite.py toolbin/tests/build_revision.py toolbin/tests/check_dirs.py toolbin/tests/compare_checksumdb.py toolbin/tests/gsconf.py toolbin/tests/get_baseline_log.py toolbin/tests/run_nightly.py toolbin/tests/gstestgs.py toolbin/tests/run_regression.py toolbin/tests/update_baseline.py]

2008-11-06T23:30:55.150402Z Marcos H. Woehrmann

Stopped generating 600 dpi raster files when running make_missing since they were never being tested.

[toolbin/tests/gsparamsets.py]

2008-11-06T23:27:54.191464Z Marcos H. Woehrmann

Made some messages prettier.

[toolbin/tests/testdiff.py]

2008-11-06T23:25:02.686517Z Marcos H. Woehrmann

Fixed typo.

[toolbin/tests/update_baseline.py]

2008-11-06T20:13:19.335714Z Igor Melichev

Fix (graphics) : A missed dependency in makefile.

[base/lib.mak]

2008-11-06T20:04:26.632073Z Igor Melichev

Fix (clist interpreter) : A faster procesing without a preliminary clearing of the band buffer.

DETAILS :

The preliminary cleaning of the buffer appears unuseful because erasepage
in the clist code performs same function.

[base/gxclread.c]

2008-11-06T19:09:39.284217Z Ralph Giles

Remove an unused variable.

[base/gdevpdtt.c]

2008-11-06T19:09:37.330669Z Ralph Giles

Add a missing include for pdf_prepare_stroke().

[base/gdevpdts.c base/devs.mak]

2008-11-05T20:41:22.951927Z Ralph Giles

Remove psromfs.mak from ugcclib.mak.

This makefile is ostensibly for the graphics library only.

[base/ugcclib.mak]

2008-11-05T20:41:06.620266Z Ralph Giles

Add -lpthread to ugcclib.mak. It is now required by sync=posync.

[base/ugcclib.mak]

2008-11-05T08:26:19.980667Z Ken Sharp

Fix (pdfwrite): several issues with PaintType 2 (stroked fonts) and PDF Text rendering modes.

Details:
Bug #690136 Differences in character stroke width
Bug #689970 major artefacts in pdfwriter output
Bug #688267 Ghostscript need native PDF graphic state
Bug #689654 pdfwrite ignores font /PaintType 1
Bug #689692 Colour and linewidth is not set correct for text with rendermode STROKE
and FILLSTROKE

The current implementation of text rendering modes has some problems. I've been able to address most of these in this patch by:

1) Making the charpath detection slightly less picky. This picks up more instances of filled text followed by 'charpath stroke', combining correctly into a PDF text  rendering mode.

2) Relaxing the criteria for detecting a Tr mode involving stroking.

3) Removing some spurious scaling, and applying a better scale factor when using stroked fonts (Paint Type 2).

There are still problems with this code, and they are insuperable in the current architecture of pdfwrite/PDF interpreter. Specifically; Text render mode 6 (fill, stroke and clip) doe snot work properly, text which is stroked using a linewidth set  outside the text block, and with a non-identity CTM and non-identity text matrix  results in incorrect stroke widths.

This will need to be addressed further under bug #688267, which is an enhancement. In the meantime this patch significantly improves the current implementation. Note; bug #689692 is still slightly incorrect with this patch, though improved. Bug #690025 is unchanged (still incorrect).

[base/gdevpdts.c base/gdevpdtt.c]

2008-11-04T05:07:32.360011Z Alex Cherepanov

Add support for indirect objects in /W and /W2 entries in the CIDFont
dictionary. Bug 690151.

[Resource/Init/pdf_font.ps]

2008-11-04T03:33:52.379523Z Alex Cherepanov

Export (i.e. don't undefine) runpdfpagerange procedure for the benefit
of PDF manipulation utilities. Bug 690153.

[Resource/Init/pdf_main.ps]

2008-11-03T06:26:32.640021Z Alex Cherepanov

Fix a bug in object stream handling that sometimes dropped incremental
updates. Bug 690141.

DETAILS:
An incremental update can replace only some of the objects in the
object stream. Old code didn't check xref tables and resolfed all 
unresolved objects from the stream. Once resolved, an object is no
longer accessed through xref.

[Resource/Init/pdf_base.ps]

2008-11-03T04:28:51.792909Z Ray Johnston

Fix Floating Point excpetion caused by improper initializer of a private device
structure subclassed (in the klunky C ghostscript fashion) from the gx_device_printers_s
structure. Restructure a macro in base/gdevprn.h to help prevent similar bit rot in the
future.  Bug 690122.

DETAILS:

The problem was with devices that use the contrib/lips4/gdevlprn.h header
files. The lp_duplex_device_body_rest_ and lp_device_body_rest_ macros that
initialized the prn_device structure 'common' elements were out of date with
respect to the revision in the gx_device_printer_s structure made for the
multi-threaded rendering. The num_render_threads_requested integer was added.

I restructured the prn_device_body_rest2_ in base/gdevprn.h so that the
contrib/lips4/gdevlprn.h initialization macro could use this to minimize the
likelihood of bit rot in the future.

I did a search for other devices that might have the same problem and did not
find them (although I may have missed them).

[base/gdevprn.h contrib/lips4/gdevlprn.h]

2008-10-28T03:15:52.084170Z Alex Cherepanov

Don't assume that the top of the dictionary stack is writable or can be made
writable by allocating a new PDF graphic state. The latter cannot be done in
pdfinflt.ps and similar clients. This patch replaces my previous fix (r. 9124)
for the bug 690088. Bug 690134.

[Resource/Init/pdf_base.ps]

2008-10-28T00:43:49.468966Z Alex Cherepanov

Ignore named encodings for known symbolic fonts. Bug 690135, customer 580.

DETAILS:
Acrobat reader appears to know that /WinAnsiEncoding is not compatible with
Wingdings2. The patch looks up the font name in a table to determine whether
the font is symbolic because corresponding /Flags attribute is unreliable.

[Resource/Init/pdf_font.ps]

2008-10-27T21:53:17.877952Z Ralph Giles

Update the documentation reference to psromfs.mak.

This file moved from base to psi in r9126.

[doc/Develop.htm]

2008-10-25T04:34:30.742669Z Michael Vrhel

Fix for bug 690103.  This issue was introduced with r8868 where spatial interpolation in the source color space was introduced.  The part that was missing in that commit was to handle the case where we had 8 bit image data that was non CIE based and NOT encoded with [0 1] .

DETAILS:

This patch was tested with forced interpolation on a set of files that are known to have issues with interpolation. It performed properly on those and on the customer's bug file. 

The part that was missing in the old code was the case where we have encoded
(not [0 1]) nonindexed 8 bit image data that is not CIE based.	For this case,
it was not getting properly decoded prior to interpolation.  

[base/lib.mak base/gscspace.h base/gxiscale.c base/gscspace.c]

2008-10-24T14:51:44.819826Z Igor Melichev

Fix (TT font handler) : Properly process a broken TTC header.

DETAILS :

Bug 690105 "seg fault reading pcl file"

1. Check for TTC version header and print error if it is unknown.
2. Fixing the formatting according to C-style.htm .

[base/gstype42.c]

2008-10-23T04:33:29.326096Z Marcos H. Woehrmann

Make gx_sort_ht_order() deterministic.

DETAILS:

The gx_sort_ht_order() routine sorts the halftone mask values.
These values are often the same and qsort() does not guarantee the
order of equal elements.  However, the order appears to be significant
for the output (differences in the nightly regression are seen on
different computers).  And it's also possible that this indeterminism
is part of the cluster regression problem.

This revision sorts equal masks by index value.

DIFFERENCES EXPECTED:

Some of the pbmraw or pkmraw nightly regressions may have minor
differences in the dithering pattern.

[base/gsht.c]

2008-10-23T04:28:42.566180Z Marcos H. Woehrmann

Changed decleration of det from float to double in gs_matrix_invert().  

DETAILS:

On peeves the results of gs_matrix_invert() change depending on
whether or not compiler optimization is enabled if det is declared
as a float.  I believe this is due to the optimized code never
storing the det value so it never get shortened to a float; by
declaring it as a double the unoptimized code should act the same.

[base/gsmatrix.c]

2008-10-21T18:09:59.854984Z Ralph Giles

Fix a makefile dependency which should have been added in r8872.

[base/lib.mak]

2008-10-21T16:26:09.248809Z Igor Melichev

Fix (PS intetreter) : Crash in garbager when resetting marks in names table.

DETAILS :

Bug 690129 "MSVC8 x64 debug build crashes in names_trace_finish"

1. The real bug : the old code sometimes removes an element from nt->sub table with name_scan_sub,
and then resets marks in the element that has same table index. 
If the removed element is the last one,
it tryes to process an uninitialised element and crashes indeterministically.
The new variable save_count works for that.
The bug persisted since the repository was created.

2. Minor change : an optimization : The old code checked twice
for the loop exit condition. To fix it we changed the type of
the variable 'i' and changed the loop condition.

[psi/iname.c]

2008-10-21T10:35:52.809111Z Ken Sharp

Fix (pdfwrite): Conversion of PaintType 0 fonts to text rendering mode
1 sometimes produced incorrect stroke width.

Details:
Bug #690116 "StrokeWidth of outline font too small"

pdfwrite converts fonts with a PaintType of 0 (outline fonts) to a normal
font, but sets the text rendering mode to 1. The calculation of the 
required stroke width was insufficient in some cases.

[base/gdevpdts.c base/gdevpdtt.c base/gdevpdts.h]

2008-10-19T20:32:03.940940Z Alex Cherepanov

Search for 'startxref' instead of '%%EOF' in PDF recovery code because
'%%EOF' is mangled more ofthen than 'startxref'. Bug 690071, customer 384.

[Resource/Init/pdf_rbld.ps]

2008-10-19T01:23:28.662366Z Alex Cherepanov

Extend the size of the array for procedures scheduled for binding in DELAYBIND
mode to 2000. Prevent an overflow when 3rd party code (such as Ubuntu CJKV
patch) binds many new procedures. Bug 690124.

[Resource/Init/gs_init.ps]

2008-10-18T10:52:42.057112Z Till Kamppeter

Fixed bug #690032: bjc600/bjc800 drivers do not work with PDF input

[base/gdevcdj.c]

2008-10-18T03:11:41.445457Z Alex Cherepanov

Fix a bug in a new reusable stream implementation introduced in rev. 8810.
Take into account unread data left in the stream buffer before refilling
the buffer. Bug 690090, customers 384, 581, 661.

[psi/zfrsd.c]

2008-10-17T22:58:21.764880Z Ralph Giles

Update properties for cups driver files.

[cups/pstoraster.in cups/pdftoraster.c cups/pstopxl.in cups/pxlmono.ppd cups/cups.mak cups/gdevcups.c cups/pxlcolor.ppd]

2008-10-17T22:57:38.635737Z Till Kamppeter

Use $(PDFTORASTER_XE) for path to compiled pdftoraster binary

[cups/cups.mak]

2008-10-17T21:46:27.567328Z Till Kamppeter

Put new files under MIT license,

[cups/pdftoraster.c cups/pdftoraster.convs]

2008-10-17T20:50:06.903656Z Igor Melichev

Fix (clist writer) : Wrong compositor cropping when a shading is entirely clipped out (continued).

DETAILS :

Bug 690106 "Regression: /unregistered in --run--" 

The recent patch for the subject is not sufficient because
an empty clipping condition cannot be anticipated in the clist writer.
To fix it we introduce a new flag gx_device_clist_writer_s::cropping_saved
especially for clist_fill_path to know whether it was called recursively
for passing an untrivial clipping path for a shading. The cropping must be restored
in the outer call iff it is set.

[base/gxclpath.c base/gxclist.c base/gxclist.h]

2008-10-17T20:27:04.052662Z Till Kamppeter

Added Ghostscript-based pdftoraster filter

[cups/pdftoraster.c cups/cups.mak cups/pdftoraster.convs]

2008-10-17T16:49:58.474885Z Till Kamppeter

Fixed several bugs, like crash if input is PDF (bug #690101), duplex not working, ...

[cups/gdevcups.c]

2008-10-17T13:44:34.259593Z Alex Cherepanov

Consider /Identity CMap compatible with any CIDFont /Ordering. Bug 690120.

[Resource/Init/gs_cidcm.ps]

2008-10-17T09:31:35.914027Z Ken Sharp

Fix (pdfwrite): ICCBased color spaces in input PDF files, /Alternate space converted to
ICCBased in output PDF file.

Details:
Bug #690038 "Regression: ghostscript cannot read ghostscript produced PDF file."

The PDF interpreter always runs with (in effect) /UseCIEColor set to true. This converts
process spaces to CIE color spaces, which are emitted in the PDF as ICCBased color
spaces when using pdfwrite/ps2write.

However, for ICCBased color spaces this caused the /Alternate space of the ICCBased
space to become another ICCBased space, which is legal but silly, and caused the GS PDF
interpreter problems.

Modified the alternate space extraction routines so that they can use the UseCIE flag in
the color handling code to prevent the base space being  substituted with a CIE space,
when the parent space is an ICCBased space.

Also discovered in passing that zfsample.c and zfunc4.c use zcolor.h but the makefile
did not have dependencies for them. Fixed.

[psi/zcolor.c psi/zfunc4.c psi/zcolor.h psi/int.mak psi/zfsample.c]

2008-10-15T17:47:00.008618Z Ray Johnston

Switch file I/O of 'opdfread.ps' to 'strmio' that supports the %rom% file system
as well as the default (%os%) file system. Bug 690074.

[base/gdevpdfu.c base/devs.mak]

2008-10-15T07:06:40.437422Z Ken Sharp

Revision 9154 accidentally left a temporary C++ style comment in place.

[psi/zicc.c]

2008-10-15T04:51:30.597312Z Michael Vrhel

Fix for bug 689961.

There was a problem with the testing to determine if a color space mapping was linear within a triangle and along a line.  The old code assumed the number of components was the same in the client and device color space.  In general this is not true, especially if we have a DeviceN color space with one color and a CMYK output device, which was the test case given.  

[base/gscspace.c]

2008-10-15T01:32:43.847670Z Ralph Giles

Exclude local repository files from other version control systems
from clusterpush.

[toolbin/clusterpush.sh]

2008-10-15T01:32:39.731625Z Ralph Giles

Read git commit names if an svn revision number isn't available.

[toolbin/clusterpush.sh]

2008-10-15T01:32:33.815878Z Ralph Giles

Update the clusterpush script for the new source locations.

Previously we copied the baseline from the last ghostpcl run on the
cluster, but since the ghostpdl tree moved to the public repository it
runs in an updating directory like gs.

Also, compare return codes numerically instead of as a string.

[toolbin/clusterpush.sh]

2008-10-14T18:27:24.066580Z Ken Sharp

Fix (PS interpreter): .seticcspace leaving operand on stack.

Details:
Bug #690039 "failure to read ICC profiles generated by  
Adobe Photoshop Version 7 and 9".

ICC profiles in PostScript comments are handled by the comment 
parsing code in gs_icc.ps, using the .seticcspace operator. After
the recent change to handle colour in 'C' rather than PostScript,
the .seticcspace operator was not removing its argument from the 
operand stack.

This led to the comment processing for other purposes (specifically
pdfwrite in this case) generating errors, as the stack had been disturbed.

Altered the 'seticc' routine (called by .seticcspace) to remove the
operand from the stack. Also required altering the C colour processing
to increment the operand stack and pass the operand that way, when 
calling seticc for PDF interpretation.

[psi/zcolor.c psi/zicc.c]

2008-10-13T21:03:48.526048Z Till Kamppeter

Make Duplex with the "pxlcolor" and "pxlmono" drivers work (standard command line options "-dDuplex" and "-dTumble").

[base/gdevpx.c]

2008-10-12T06:38:18.212672Z Alex Cherepanov

Remove spurious un-definition of GlobalSubrs attribute during loading of
OpenType CFF fonts as CIDFont resources. Bug 690113, customer 1110.

[Resource/Init/gs_cff.ps]

2008-10-10T08:51:42.858031Z Ken Sharp

The update for opdfread.ps in revision 8706 missed a required routine 'putu32'.

Details:
putu32, used to update the offsets of TrueType tables in the TrueType header, uses
putu16, which was accidentally omitted. This (oddly) didn't seem to cause a problem with
testing but did for the customer. Added the missing routine.

[Resource/Init/opdfread.ps]

2008-10-09T19:48:14.487705Z Alex Cherepanov

Scale widget annotations in x and y directions to fit the BBox of the
appearance stream into the annotation rectangle. Old code considered
y direction only. Bug 690109.

DETAILS:
This implementation is mainly based on the experiments with AR5.

[Resource/Init/pdf_draw.ps]

2008-10-09T17:53:10.358436Z Ray Johnston

Increase stack size to allow GS to run on older NT versions. Thanks to Alex
for pointing this out.

[psi/dw32c.def]

2008-10-08T15:03:58.878575Z Ray Johnston

Increase stack size to allow GS to run on older NT versions. Thanks to Alex
for pointing this out.

[psi/dwmain32.def]

2008-10-08T13:40:55.237034Z Ken Sharp

Log:
Fix: ps2write. Very large TrueType fonts (>64Kb), when converted to Type 42
fonts for use in PostScript, must contain an /sfnts entry, which is an
array of strings comprising the TT font. There are restrictions on where
the original data is split to form the strings, which ps2write was not
honouring.

DETAILS:
Bug #690044 "Printer error (49,4C02) with ps2write output"
Bug #690012 "Error with ps2write output ps file when Unicode font is used"
Bug #690030 "Issue with NeverEmbed flag with ps2write device for some of the fonts"

There are five changes made to opdfread.ps in order to fix these problems:

1) The VM allocation mode used by opdfread is now local throughout, where 
   previously it was global. Judging by the number of local hacks, this 
   has frequently caused problems in the past.

2) There was a problem if a Font Descriptor contained neither a FontFile
   nor a FontFile2 entry. This was due to not embedding fonts, but caused
   the code to enter an infinte loop looking for one or the other.

3) After encountering the 'xref' in the PDF file, the code simply
   flushed the input file. This could potentially cause a problem if the
   EOF was not signalled back to the interpreter. This was theorised to
   be one of the issues, and fixed in passing, even though it was not
   in fact causing a problem.

4) The sfnts array is now built up from strings which follow the rules
   laid out in the Type 42 Font Format specification (tech note 5012)
   In particular the glyf table is now split on glyph boundaries. This
   only seems to cause problems for Adobe interpreters.

5) The 'post' table processing was modified to use an array of strings
   instead of a single string, if the table was >64Kb.

[Resource/Init/opdfread.ps]

2008-10-08T07:43:52.342922Z Igor Melichev

TT fonts : An initial implementation of GSUB.

DETAILS :

This is a partial fix for bug 689304  
"improper handling of vertical japanese text".
It works for brackets and punctuation signs orientation
when a vertical CJK text is painted with an 
Open Type font that defines a GSUB table.

The curent implementation always chooses a Format 1 
substitution table that substitutes single glyphs to single glyphs.
It doesn't account LangSys and feature tables.
Such logic is owned from the CJK patch attached to the bug 689304.
It may need further improvements.

Opposite to CJK group we implement it in C to allow
to it to work for other interpreters besides Postscript.

Interpreters may need to add an explicit call to 
the new function gs_type42_substitute_glyph_index_vertical
to involve the new functionality. This happens due to
a compatibility to PS interpreter that needs to call
the new function from the interpreter code rather than from
the graphics library.

See comments in code for more details.

[psi/zchar42.c base/gxfont42.h base/gstype42.c Resource/Init/gs_ttf.ps]

2008-10-08T05:56:27.963219Z Ray Johnston

Fix Windows stack overflow when NumRenderingThreads > 0. This was identified
during testing for bug 690108 (see comments, #1 and #2). This is a work around
as it does not address the excessive stack usage, but does work around the
problem by throwing memory at it. Bug 690198.

[base/gp_wsync.c]

2008-10-07T20:05:58.844384Z Ray Johnston

Restore function of NumRenderingThreads > 0 that was inadvertently disabled
by previous commit to this module.

DETAILS:
The segfault was fixed by making sure that the clist structure was initialized
as a 'reader', but this included setting ymin=0, which meant that the following
test for crdev->render_threads == NULL always reverted to single threaded
rendering.

Note that this also will return the error if "clist_close_writer_and_init_reader"
returns an error value (<0), which is consistent with the behavior of the
clist_get_bite_rectangle function (NumRenderingThreads==0).

[base/gxclthrd.c]

2008-10-05T17:51:25.414873Z Ray Johnston

Fix SEGV when NumRenderingThreads > 0 caused by improper clist reader phase
initialization. Bug #690108.

DETAILS:
Make sure that the clsit device is initialized to 'reader' mode before checking
the 'render_threads' element of the reader device. Prevents a SEGV when the
corresponding element of the 'writer' device structure was non-zero at the end
of the page since the render_threads table will not have been allocated and
some other (invalid) pointer would be used instead.

[base/gxclread.c base/gxclthrd.c]

2008-10-02T19:33:22.695690Z Ralph Giles

Move psromfs.mak to the interpreter source tree.

This file defines variables used by lib.mak, but the resources are all 
related to the ps interpreter, so it makes more sense to keep it there.
It is only included by top-level makefiles, so this doesn't violate
the dependency boundary.

[psi/os2.mak base/bcwin32.mak base/ugcclib.mak base/psromfs.mak psi/psromfs.mak base/macosx.mak base/watcw32.mak base/Makefile.in base/unix-gcc.mak base/unixansi.mak ijs/unix.mak psi/msvc32.mak base/macos-mcp.mak]

2008-09-30T19:01:35.905183Z Ray Johnston

Clean up a few coverity gripes (nothing important)

[base/gxclthrd.c]

2008-09-27T01:39:36.090759Z Alex Cherepanov

Set the temporary value of PDFDEBUG flag using 'gput' procedure instead of
'def' because initial PDF graphic state is represented by a read-only
dictionary. Bug 690088.

[Resource/Init/pdf_base.ps]

2008-09-25T23:48:03.662203Z Alex Cherepanov

Process invalid PDF operator QBT as Q BT .
Bug 690089, customer 384.

[Resource/Init/pdf_draw.ps]

2008-09-25T13:36:55.133901Z Igor Melichev

Fix (printer devices) : Allow retries for raster buffer allocation when BufferSpace is default.

DETAILS :

Bug 690055 "seg fault at higher resolutions". 

1. The old code implements a branch with increasing the buffer space
when a clist writer initialization fails with limitcheck and
the buffer size is default.
However the clist writer initialization never returns limitcheck,
it does return rangecheck instead. I guess the bug is in the
retry condition so I change it to rangecheck.

2. When the buffer space size is not default,
the old code crashes while setpagedevice,
if the device was opened. The clist initialization
returns with an inconsistent clist writer state 
and the device still has is_open flag set.
The new code resets is_open if the clist writer initialization
fails while setpagedevice.    

Thanks to Ray for participation.


[base/gxclist.c base/gdevprn.c]

2008-09-25T10:10:03.369546Z Igor Melichev

Fix (clist writer) : Wrong compositor cropping when a shading is entirely clipped out.

DETAILS :

Bug 690078 "clist error in fts_41xx.xps and fts_39xx.xps".

clist_fill_path implements a special processing of a clipping path for shadings.
It falls back to gx_default_fill_path, which accounts both filling path and clipping patch.
Doing so, gx_default_fill_path passes the clipping path to the clist writer
as a high level object with calling clist_fill_path with a NULL color.

However the 2 calls to clist_fill_path differently processed the
case of the empty clipping : the first call did not return immediately
and restored the compositor cropping interval after returning from gx_default_fill_path, 
but the second call does return immediately and did not save the interval before
the clipping path is written. Thus the interval was restored to a wrong state 
that occasionally left from a preceeding filling operation.

This patch moves the check for empty clipping ahead the main
processing in clist_fill_path, so that the 2 calls do same thing
about the skipping of an empty clipping.

[base/gxclpath.c]

2008-09-24T11:07:46.268855Z Ralph Giles

Initial support for aes decryption streams.

Details:

This adds an AESDecode filter to the interpreter which wraps the
new aes stream implementation.

[psi/zfaes.c psi/int.mak]

2008-09-24T11:07:43.989804Z Ralph Giles

Initial support for aes decryption streams.

Details:

This adds support for compiling the xyssl aes implementation added
in r8870, and a stream library wrapper which calls it.

Note that while an s_aes_set_key() procedure is provided to set a
key in an allocated stream state, it merely stores the key, and the
actual allocation of the aes_context structure and initialization
with the key happen the first time the stream's process() method is
called.

This is because a typical call to filter_read() in the interpreter
binding will end up memcpy()ing this to its own separately allocated
stream state. This preserves any static initialization performed by
the caller, such as passing in the key, but the xyssl aes_context
structure includes an internal pointer, and this is not updated when
the state is copied.

The internal pointer provides an indirect reference to support optional
storage of the sbox in secure memory. We're not using this feature, so
we could remove it, or update the pointer ourselves when our process()
method is first called. However, working around the issue by delaying
all opaque initialization until the stream is working is more robust.

[base/saes.c base/lib.mak base/saes.h]

2008-09-23T18:57:30.153977Z Igor Melichev

Fix (PS interpreter) : Incorrect data in garbager descriptor for reusable stream state.

DETAILS :

The bug was introduced in rev 8810.
It defines a wrong offset for a relocating pointer.
The reason is an inaccurate copy-and-replace coding.
Fortunately the offset pointed to a static data pointer,
which the garbager filtered out with an error message.

[psi/zfrsd.c]

2008-09-22T10:56:52.199700Z Ken Sharp

Remove a number of no longer required includes from the source, and update the makefile to remove the dependencies.

Local regression testing shows no differences, local builds correctly generate executable.

[base/gdevpdfm.c base/gdevpsdp.c base/gdevpdt.c base/gdevpdfo.c base/gdevpdf.c base/gdevpsdu.c base/gdevpdfd.c base/gdevpdfu.c base/gdevpdfv.c base/gdevpsdi.c base/gdevpdfg.c base/devs.mak]

2008-09-19T23:31:25.043936Z Ralph Giles

Fix a double fclose().

fuzzy_diff_images() doesn't open the files it reads from, so it should
not close them when cleaning up. The caller takes care of this on line
764, right after calling fuzzy_diff_images().

[toolbin/tests/fuzzy.c]

2008-09-19T21:45:10.190751Z Ralph Giles

Correct two typos in error message strings.

[toolbin/tests/fuzzy.c]

2008-09-19T21:45:09.139047Z Ralph Giles

Move the freport initizialization out of fuzzy_diff_images() to silence
a gcc uninitialized variable warning.

[toolbin/tests/fuzzy.c]

2008-09-19T21:45:08.203062Z Ralph Giles

Remove trailing whitespace.

[toolbin/tests/fuzzy.c]

2008-09-19T21:45:06.338528Z Ralph Giles

Fix a gcc warning. Bug 690054.

Details:

The gs_note_error() macro can't be called like a normal function. In
non-debug builds it reduces to its argument, generating an empty
statement. Placing it after a return or on the right hand side of an
assignment prevents this warning.

[base/gdev8510.c]

2008-09-19T16:22:32.262870Z Ralph Giles

Include our math_.h wrapper instead of math.h.

Details:

We have header_.h wrappers for most system headers which include various 
platform-specific #ifdef trees to ensure the symbols we use are defined.

Except for some of the bootstrap code, these wrappers should always be 
used instead of the system headers.

[psi/zcolor.c psi/int.mak]

2008-09-19T16:08:02.308202Z Ralph Giles

Also remove gscolor1.h from the zcolor.c dependency list.

[psi/int.mak]

2008-09-19T13:44:55.520555Z Ken Sharp

Remove gscolor1.h. We no longer use gs_setcmykcolor here and so this header is not required.

[psi/zcolor.c]

2008-09-19T00:01:51.675092Z Ralph Giles

Use a portable path separator in gs.mak.

[base/gs.mak]

2008-09-18T23:55:26.486186Z Ralph Giles

Remove a spurious $(_I) and add use portable $(D_)...$(_D) for defines
as needed by the openvms build. Bug 690084.

[base/libpng.mak base/devs.mak]

2008-09-18T23:50:07.487730Z Ralph Giles

Fix typos in third-party library paths introduced in r6514. Bug 690084.

[base/openvms.mmk]

2008-09-18T23:31:16.150062Z Ralph Giles

Additional leading space characters before colons in makefiles. Bug 690084.

[base/lib.mak contrib/contrib.mak]

2008-09-18T20:32:08.326447Z Ralph Giles

Space makefile colons for the benefit of VMS. Bug 690084.

OpenVMS supports a basic makefile syntax, but requires a space on both 
sides of the dependency colon. We try to maintain this in our 
cross-platform makefiles. 

[contrib/contrib.mak base/contrib.mak base/devs.mak]

2008-09-18T18:23:22.617130Z Ralph Giles

Move time_.h to the top of the include list.

[base/mkromfs.c]

2008-09-18T00:37:45.093298Z Ralph Giles

The SunPro compiler doesn't handle variable length arrays in structs.

Bug 689079. Patch from Jon Peatfield.

[contrib/opvp/opvp.h]

2008-09-18T00:37:43.189925Z Ralph Giles

Clean up whitespace in the opvp device source.

[contrib/opvp/opvp.h contrib/opvp/gdevopvp.c]

2008-09-18T00:37:41.259902Z Ralph Giles

Fix: default to MITER line joins in the opvp device. Bug 689079.

The previous default was BUTT, which is a line cap, not a join. This
looks like it was a cut-and-paste error. Patch from Jon Peatfield.

[contrib/opvp/gdevopvp.c]

2008-09-18T00:37:38.655050Z Ralph Giles

Fix: don't treat char as unsigned in the opvp device. Bug 690079.

[contrib/opvp/gdevopvp.c]

2008-09-18T00:12:11.086491Z Ralph Giles

Enable jasper assembly optimizations with _MSC_VER instead of _WIN32 so the MSVC-specific inline code won't be passed to gcc in mingw builds.

Bug 690070.

[jasper/src/libjasper/jpc/jpc_qmfb.c]

2008-09-16T00:29:06.813229Z Ralph Giles

Remove an inadvertent semicolon in gs_throw_code, added in r9037.

[base/gserror.h]

2008-09-14T12:20:56.043501Z Alex Cherepanov

Allocate missing FontInfo dictionary in a matching global or local memory and
use .forceput to override read-only status of the font directory. Bug 690063.

[Resource/Init/pdf_font.ps]

2008-09-13T20:22:25.237944Z Ralph Giles

Move the dxmain.c and dxmainc.c front ends to the interpreter source 
directory.

[base/dxmain.c psi/dxmain.c base/unix-dll.mak base/dxmainc.c psi/dxmainc.c]

2008-09-12T08:05:54.684727Z Ken Sharp

The CIEBasedDEF/DEFG colour space validation did not insist that the dictionary contain a
/Table entry, which is a required entry. It also did not limit the numeric values in the
/Table array to integers, reals are not allowed.

[psi/zcolor.c]

2008-09-11T16:03:58.760444Z Ray Johnston

Add support for passing the requested number of copies through to the PXL
output file. Tested on an actual HP printer.

[base/gdevpx.c]

2008-09-10T21:35:24.802228Z Ralph Giles

Change two more printf(%x) uses with pointers to use %p.

Update copyright.

[base/gxclmem.c]

2008-09-10T21:33:26.724052Z Ray Johnston

Replace non-standard %P with %p for pointer printing.

[base/gxclmem.c]

2008-09-09T21:00:54.348833Z Ralph Giles

Ask gcc to warn about declarations beyond the start of a block.

[base/configure.ac]

2008-09-09T20:31:37.982033Z Ralph Giles

Move variable declarations to the top of blocks in the fontconfig 
support code.

Also fixes a gcc warning about passing int 0 instead of NULL to 
terminate an argument list.

[base/gp_unix.c]

2008-09-09T18:45:27.627887Z Ralph Giles

Add a space to the product name between the family and release names.

[base/gscdef.c]

2008-09-09T17:48:26.542519Z Ralph Giles

Move some interpreter headers from base to psi.

These were missed in the original merge of the reorganization patch.
Also, add missing makefile dependencies for these new headers.

[base/zcolor.h base/zicc.h psi/zcolor.h psi/zicc.h base/zcie.h psi/zcie.h psi/int.mak]

2008-09-09T14:33:31.847337Z Ken Sharp

Henry's coverage test revealed that a couple of 'belt and braces' checks in the RGB->HSB
conversion were impossible to trigger. Removed those checks.

[psi/zcolor.c]

2008-09-06T09:57:38.114441Z Ken Sharp

Address some more issues raised by Coverity. Check return values in some places which were
not previously checked, initialise some variables, and remove some dead code.

Local regression testing of pdfwrite shows no differences.

[base/gdevpdtd.c base/gdevpdtt.c base/gdevpdte.c base/gdevpdtf.c base/gdevpdfe.c base/gdevpdtw.c base/gdevpdti.c]

2008-09-04T15:46:56.923276Z Igor Melichev

Fix : Divide gdevp14.c into 2 modules.

DETAILS :

This change is syntactically equivalent.
The purpose is to minimize dependencies between projects.
The new module gxblend1.c keeps color blending algorithms moved from gdevp14.

[base/gdevp14.c base/lib.mak base/gdevp14.h base/gxblend.c base/gxblend1.c base/gdevdevn.h base/gxblend.h]

2008-09-04T14:06:17.707413Z Igor Melichev

Fix (graphics) : Preovide a right check for incorrect call to pdf14_pop_transparency_group.
 
DETAILS :

This patch doesn't change behavior with regular runs.
In hypothetic cases, when .entransparencygroup is called with no
L
due to unreferencin null pointer.

[base/gdevp14.c]

2008-09-04T10:05:54.831940Z Ken Sharp

More minor issues reported by Coverity. An unchecked return code from cos_dict_find_c_key,
and some dead code.

[base/gdevpdfm.c]

2008-09-04T10:04:10.193139Z Ken Sharp

A couple of issues detected by Coverity. Firstly an error condition could lead to a file being
left open. Secondly a call to pdf_restore_viewer_state which didn't check the return value.

[base/gdevpdfu.c]

2008-09-04T10:02:04.794387Z Ken Sharp

More very minor dead code removal, again as noted by Coverity.

[base/gdevpdtb.c]

2008-09-04T10:01:12.562540Z Ken Sharp

Remove some dead code from cmap handling, as noted by Coverity.

[base/gdevpdtc.c]

2008-09-04T09:59:11.733313Z Ken Sharp

Check the return code from pdf_write_resource_objects when closing a page. Fixes Coverity
warning.

[base/gdevpdf.c]

2008-09-03T20:49:13.486158Z Ray Johnston

Add protection for the "finish" exit point for potential (no longer exists
since rev 9062) case when f==NULL when code >= 0. Belt and suspenders couldn't
hurt to improve maintainability (prevent future problems). Original problem
reported by Coverity analysis.

[base/gxclmem.c]

2008-09-03T12:20:27.869178Z Igor Melichev

Fix : gcc compiler warnings (continued).

DETAILS :

Repair a file broken due to Far 1.70 editor glitch on Vista.

[psi/zfunc4.c]

2008-09-03T11:42:35.783010Z Igor Melichev

Fix : gcc compiler warnings.

DETAILS :

This patch fixes only those ones which either were approved or belong to my ownership.

[base/gxclread.c base/gxpcopy.c base/gxclpage.c psi/zfunc4.c base/gxclutil.c base/gxclmem.c base/lib.mak base/gxiscale.c base/gxclmem.h base/gdevpdtd.c psi/int.mak psi/zfsample.c base/gdevpdte.c base/gximage1.c base/gsovrc.c base/gdevprn.c base/gxstroke.c psi/zfunc.c base/gspath1.c base/gxshade6.c psi/zfrsd.c base/gxclpath.c psi/zfunc.h psi/igcstr.c base/mkromfs.c base/gstype42.c base/gdevdsha.c base/gxfill.c base/gxclrast.c]

2008-09-02T18:37:07.959806Z Till Kamppeter

Fixed small bug in the patch to add a PJL command for setting the resolution to
the pxlmono/pxlcolor drivers (rev 9060).

[base/gdevpxut.c]

2008-09-02T09:06:41.787945Z Till Kamppeter

Let pxlmono/pxlcolor drivers add resolution setting to the PJL header. Printers need the PJL command to set the resolution (see bug 689230). Now the printing resolution can be easily controlled with the "-r" command line option.

[base/gdevpxut.c]

2008-09-01T17:03:20.988497Z Alex Cherepanov

Fix incorrect error code test in the calculator function validation
procedure.

[psi/zfunc4.c]

2008-09-01T16:53:43.689721Z Ken Sharp

Resolve another gcc compiler warning. The test was incorrect, now it is correctly taking the
text render mode into account.

Local regression testing shows no differences.

[base/gdevpdts.c]

2008-09-01T08:49:44.722693Z Ken Sharp

Fix a warning from older versions of gcc. Spotted by Russell Lang when doing OS/2 build. 
Oddly, newer versions of gcc don't spot this, even though the code was technically
redundant.

Also remove some commented out code that should not have been present, and fix a couple
of warnings produced by recent versions of gcc regarding unused local variables and code.

Local regression testing exhibits no differences.

[base/gdevpdtt.c]

2008-08-31T00:28:20.047781Z Russell Lang

Add a makefile target for a Windows source zip file, 
used in building a release.

[psi/winint.mak]

2008-08-30T23:23:04.017387Z Alex Cherepanov

Make PDF interpreter run our /Install procedure after the user's procedure
because: (1) PDF interpreter caches the CTM, (2) the user's procedure may
replace CTM by calling setmatrix. Bug 689914, customer 770.

[Resource/Init/pdf_main.ps]

2008-08-30T14:07:29.736170Z Igor Melichev

Fix (PS interpreter) : Wrong dependencies in makefile.

[psi/int.mak]

2008-08-30T13:38:27.563236Z Russell Lang

Fix gcc warning on OS/2.

[base/gdevdsp.c]

2008-08-30T13:31:29.235544Z Russell Lang

Fix the OS/2 build after the source reorganization.
Remove the os2pm device and the old DLL interface for OS/2, 
to avoid direct links from the graphics library into the 
PS interpreter.

[base/gp_os2.c base/os2.mak psi/dpmain.c psi/gsos2.def base/gsos2.icx doc/Develop.htm psi/gsos2.rc base/pcwin.mak base/dpmain.c base/gsos2.def psi/os2.mak base/mkromfs.c base/gsos2.rc psi/gsdllos2.h psi/gsos2.icx base/gp_os2fs.c base/gdevpm.c psi/gsdll2.def base/devs.mak]

2008-08-29T19:47:13.384972Z Ralph Giles

Update the Visual Studio project file generator for
the new source locations. Untested.

[toolbin/msvcxml.bat]

2008-08-29T18:46:21.860372Z Ralph Giles

Split the source tree into two new directories.

PSSRC files are now in 'gs/psi'.
GLSRC files are now in 'gs/base'.

This is to facilitate build modularization and merging in the ghostpdl 
tree.

NOTE: msvc32.mak is now in psi, not src.

[/trunk/ghostpdl/language_switch/pspcl6_msvc.mak /trunk/ghostpdl/main/pcl6_gcc.mak src /trunk/ghostpdl/tools/check_deps.py doc/Develop.htm psi /trunk/ghostpdl/svg/svg_gcc.mak /trunk/ghostpdl/xps/xps_msvc.mak /trunk/ghostpdl/main/pcl6_msvc.mak /trunk/ghostpdl/doc/ghostpdl.tex /trunk/ghostpdl/psi/psitop.c doc/API.htm doc/Issues.htm /trunk/ghostpdl/svg/svg_msvc.mak /trunk/ghostpdl/language_switch/pspcl6_gcc.mak doc/Make.htm doc/Drivers.htm base autogen.sh doc/Release.htm doc/C-style.htm /trunk/ghostpdl/doc/ghostpdl.txt /trunk/ghostpdl/xps/xps_gcc.mak]

2008-08-28T19:47:00.816950Z Ralph Giles

Replace 3d with 3rd in the documentation and regularize '3(r)d party' as 
'third-party'. Bug 690004.

[doc/Use.htm doc/Lib.htm]

2008-08-28T02:40:07.463083Z Ralph Giles

Use the new gs_rethrow_code() macro in svgwrite.

[src/gdevsvg.c]

2008-08-28T02:40:06.379728Z Ralph Giles

Add gs_throw_code() and gs_rethrow_code() macros for use in situations
where the normal error string does not fit or is redundant.

[src/gserror.h]

2008-08-28T02:40:04.423296Z Ralph Giles

Fix some code style issues in the svgwrite device.

We can't use gs_note_error() as we were because it returns the error
code which generates an empty statement warning with gcc. Use gs_throw()
instead for now.

[src/gdevsvg.c]

2008-08-28T00:36:33.257400Z Ralph Giles

Update warnings policy; we agreed to fix all warnings.

[doc/C-style.htm]

2008-08-28T00:03:40.520992Z Ralph Giles

Document the motivation for a source style item.

Details:

There has been some controvesy over the rule that single-statement 
bodies of control structs must be on their own line. Specifically:

  if (code < 0)
    return code;

instad of:

  if (code < 0) return code;

despite the latter being less obtrusive for common error checks.

Several developers have requested this because it allows setting a 
breakpoint directly on the return statement instead of a conditional 
return on the conditional line, or a breakpoint at the return inside
the single source line. This is therefore a practical issue, not just
one of readability and style.

[doc/C-style.htm]

2008-08-27T17:27:24.986727Z Ralph Giles

Fix more html conformance problems with the documentation.

[doc/Ps2ps2.htm doc/Fonts.htm doc/Use.htm doc/Ps2pdf.htm doc/Develop.htm doc/Deprecated.htm doc/Install.htm doc/API.htm doc/Issues.htm doc/Make.htm doc/Drivers.htm doc/Release.htm doc/C-style.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm]

2008-08-27T02:57:23.718740Z Ralph Giles

Remove Humor.htm.

The joke has gotten old, and blogs are a better medium for this sort of 
thing.

[doc/Humor.htm doc/Readme.htm]

2008-08-27T02:16:43.113337Z Ralph Giles

Remove the obsolete HTML style guidelines.

We no longer expect readers to look at the raw html in a text editor. 
Documentation should declare its format specification and conform to it, 
attempting to match local style where appropriate.

[doc/Htmstyle.htm doc/Readme.htm]

2008-08-27T02:14:10.447789Z Ralph Giles

Replace the awkward <b><tt> construction with css-styled <code> elements.

[doc/History7.htm doc/Fonts.htm doc/Projects.htm doc/Ps2ps2.htm doc/Use.htm doc/Readme.htm doc/Develop.htm doc/Ps2pdf.htm doc/Deprecated.htm doc/Source.htm doc/Helpers.htm doc/Psfiles.htm doc/Lib.htm doc/Install.htm doc/Htmstyle.htm doc/API.htm doc/gs.css doc/DLL.htm doc/Make.htm doc/Drivers.htm doc/Unix-lpr.htm doc/Commprod.htm doc/C-style.htm doc/Ps-style.htm doc/Release.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm doc/Ps2epsi.htm]

2008-08-26T21:50:26.926408Z Ralph Giles

Cast away signed/unsigned char warnings in gdevsvg.

Patch from Igor Melichev. Also cleaned up some trailing whitespace.

[src/gdevsvg.c]

2008-08-26T21:40:55.546109Z Ralph Giles

Remove references to bits64 from the source style documentation. It is 
superceeded by the stdint types.

[doc/C-style.htm]

2008-08-26T15:59:38.718117Z Igor Melichev

Fix (PDF interpreter) : Implementing a temporary option for development needs of images with soft mask. 

DETAILS :

It doesn't chamge the behavior for regular runs.
The new temporary option is for development purpose only.
It will be removed after the complete implementation of images with soft mask is done.

[Resource/Init/pdf_draw.ps]

2008-08-26T15:31:03.416051Z Igor Melichev

Fix (PDF interpreter) : A wrong comment about procedure operands for is_big_mask .

DETAILS :

It changes a comment only.

[Resource/Init/pdf_draw.ps]

2008-08-26T07:02:55.610521Z Igor Melichev

Fix (graphics) : Scanline algorithm missed pixels at horizontal boundaries.

DETAILS :

Bug 689402 "Regression: differences in dina3_watermark.pdf".

The defect looks as an unimplemented branch.
which persists since Ghostscript 8.00 released on Decebmer 2002
or longer. We could get a similar problem when runnung Bug687832.pdf
with Ghostscript 7.04 (it can't handle dina3_watermark.pdf),
and our reading of its code shows that the problem presents in it.
So the problem is really antique.
 
The bottom of the problem is that fill adjustment was not applied 
to some horizontal segments. Due to that some pixel centers are not covered 
when they must be.

[src/gxfillsl.h]

2008-08-23T16:39:21.950258Z Alex Cherepanov

Fix 6 Coverity warings about local variables hiding function arguments
by renaming local variables.

[src/gsbitops.c]

2008-08-23T01:05:47.610764Z Russell Lang

Remove reference from Windows image window code back to PostScript interpreter,
to allow the image window code to be used with non-interpreter builds.

[src/dwimg.h src/winint.mak src/dwmain.c src/dwmain.rc doc/Develop.htm src/dwmainc.c src/dwmain.h src/dwimg.c src/dwres.h]

2008-08-22T16:34:36.763761Z Ralph Giles

Move the dw source files from GLSRC to PSSRC. Items in GLSRC shouldn't 
depend on items in PSSRC. This is in preparation for the code 
reorganization.

Details:

A number of these files, dwtext, dwtrace, and with some modifications 
dwimg don't actually have PSSRC dependencies, but it's easier to keep 
all the files built by winint.mak there for now. They can be moved back
into the base library later when they're useful for other builds.

[src/winint.mak]

2008-08-22T01:13:28.560292Z Ralph Giles

Remove an unnecesary iapi.h include.

[src/winint.mak src/dwimg.c]

2008-08-22T01:11:24.167807Z Ralph Giles

Remove trailing whitespace.

[src/dwimg.h src/dwimg.c]

2008-08-21T23:26:24.907412Z Ralph Giles

Add a missing return value check. Coverity issue 1847.

[src/zcolor.c]

2008-08-21T22:55:00.562927Z Ralph Giles

Correct a double free introduced in r9005.

[src/gp_unix_cache.c]

2008-08-21T21:51:24.194924Z Ralph Giles

Remove trailing whitespace.

[src/ztrans.c]

2008-08-21T08:35:09.363063Z Ken Sharp

Submission for revision 9008 initialised the wrong 'pfn' variable. 

Details:
Accidentally changed the use in 'zbuildfunction' instead of 'buildfunction'. Correcting.

[src/zfunc.c]

2008-08-21T08:33:31.319105Z Ken Sharp

Fix some more Coverity warnings

Details:
Two places where a return value (from names_ref) was not being checked, one inadvertent
piece of dead code (duplicating a previous error check) and one genuine case of a variable
which could potentially be used uninitialsed.

[src/zcolor.c]

2008-08-21T08:28:49.451522Z Ken Sharp

Silence an 'uninitialised variable' warning from Coverity.

Details:
Function initialisation is a bit round about. We pass a function pointer to
make_sampled_function, which assigns it to a local variable. That variable is passed to
gs_function_Sd_init, which immediately zeros it....

Since the pointer is never actually used, setting it to NULL should silence the warning.

[src/zfunc.c]

2008-08-20T23:58:43.536642Z Ralph Giles

Replace an abs() call with our any_abs() macro. Also remove an 
unnecessary math_.h include.

Details:

A call to abs() was added in r8942. Technically the prototype for this 
is in stdlib.h, but it's a built-in in most compilers so this didn't 
raise a warning. We do include stdlib.h elsewhere, usually for qsort() 
or malloc(), but abs() is only called from comment pseudo code; in 
practice the any_abs() macro or fabs() from math.h are used instead.
Because this isn't in an inner loop, speed isn't important, so we prefer 
the macro to a system header include for consistency.

Sine the beginning of repository history, gdevbit.c has included math.h, 
but I don't see any math library calls now, so it as been removed.

[src/gdevbit.c src/devs.mak]

2008-08-20T23:22:49.144680Z Ralph Giles

Check for and propagate failures to find matching component indexes in 
jpx streams.

[src/sjpx.c]

2008-08-20T22:09:49.649774Z Ralph Giles

Further cleanups to the unix persistent cache error handling.

[src/gp_unix_cache.c]

2008-08-20T21:32:28.795836Z Ralph Giles

Fix memory and file handle leaks in the unix persistent cache error 
handling. Also document that it is not re-entrant.

[src/gp_unix_cache.c]

2008-08-20T19:46:20.907096Z Ralph Giles

Remove trailing whitespace.

[src/gp_unix_cache.c]

2008-08-20T19:09:44.615235Z Ralph Giles

Add a cast in svgwrite to be explicit that we're only using the lower 24 
bits of the color index.

[src/gdevsvg.c]

2008-08-20T18:26:10.369143Z Ralph Giles

Fix __func__ on the default (non-C99) gcc build.

Details:

__func__ is a variable in C99. The earlier __FUNCTION__ is a magic 
preproccessor define in MSVC 7 and later, so the #if defined() clause 
enabled it. However, in GCC it is a magic string literal instead and so 
this clause did not enable it. Therefore we add an explicit check for 
the appropriate GCC version and define the same substitution for that 
compiler.

[src/gserror.h]

2008-08-20T01:54:36.820847Z Ralph Giles

Add the svgwrite device to the default windows build.
Bug 690028.

[src/msvc32.mak]

2008-08-19T04:07:40.862102Z Ralph Giles

Remove the jasper dependency from jpxtopdf. It's straightforward to 
parse the image header ourselves.

[toolbin/jpxtopdf.c]

2008-08-17T12:31:25.491176Z Alex Cherepanov

Fix a bug in error checking code introduced in the rev. 8996 in pamcmyk32
device. Bug 689583.

[src/gdevpbm.c]

2008-08-17T06:19:35.130662Z Alex Cherepanov

Check return values from all stdio functions in all pnm drivers and propagate
error codes upwards. Bug 689583.

[src/gdevpbm.c]

2008-08-17T01:19:23.099945Z Alex Cherepanov

Add one more NMAKE version recognized as MSVC 7.
Bug 689816, customer 351.

[src/msvc32.mak]

2008-08-16T04:18:20.474141Z Alex Cherepanov

Work around a bug in a PDF file produced by "Nitro PDF Driver". Assume invalid
operator '-' to be a number 0. Bug 690012, 

[Resource/Init/pdf_main.ps]

2008-08-16T02:00:51.387588Z Alex Cherepanov

Fix parsing of large embedded TrueType fonts by ps2write header: (1) read the
file into multiple strings for sfnts array. (2) use multiple reads to skip
over large parts of the file. Also modify Type42 font reader to allow TrueType
objects to span sfnts string boundaries. Bug 690012.

[src/gxttfb.c Resource/Init/opdfread.ps]

2008-08-14T17:54:06.399403Z Alex Cherepanov

Use GNU iconv.h header in compatibility mode unless we link with GNU libiconv.
This is needed for compiling gs with gcc under HP-UX 11.11.

DETAILS:
gdevopvp.c uses some basic functionality from iconv library but none of GNU
extensions. So the native implementation is searched first.

GNU header uses different names in the library and defines some macros to map
iconv* names to GNU libiconv* names.

gcc looks for GNU version of iconv.h first, which requires a compatibility
flag to link with the native libraries.

So the compatibility flag is set when iconv* functions are not found but
libiconv* functions are found.

[src/configure.ac contrib/opvp/gdevopvp.c]

2008-08-13T01:56:36.856132Z Ray Johnston

Update the fonts to those that the nightly and cluster regressions have
been using all along. The -Ifonts in the regression script was causing
the contents of Resource/Font to be ignored. These fonts are the std-8.11
version.

Note we probably next need to move to the newer version of these fonts
with the metrics fixed, but this is a first step.

DETAILS:
These are files that were part of the distribution 8.11 files that really
can't live in the Resource/Font directory since some applications or
test files will enumerate (with 'resourceforall') the directory and will
get errors if files are there that are not fonts.
___________________________________________________________________________
				README:
This is release 1.0.7pre22 of Valek Filippov's improved versions of the URW
type 1 font collection, repackaged for distribution with Ghostscript.

Cyrillized free URW fonts.

These fonts were made from the free URW fonts distributed with ghostcript.
There are NO changes in the latin part of them (I hope).
Cyrillic glyphs were added by copying suitable latin ones
and painting oulines of unique cyrillic glyphs in same style as the others.
For all modification pfaedit was used.
The license for result is (of course) same as for original fonts,
i.e. GPL with an exception that you can put these fonts in your own non-GPLed
documents. (Looks like LGPL from my point of view =).

The "sources" of these fonts in the native pfaedit format are available
at ftp://ftp.gnome.ru/fonts/sources

The great font editor pfaedit is available at http://pfaedit.sf.net.
That page also includes some links to fonts created by
George Williams -- the author of pfaedit.

Acknowledgements:
I would like to thank George Williams, the pfaedit's author and developer.
He is the most bug-reporter/feature-requester friendly developer
I ever saw in my not so short life. At some moment in the future
I must write a book about him: "George Williams and my best experience
in bug-reporting." George also greatly helped me bug-hunting these fonts,
explained to me some very important things about fonts and font design,
quickly adopted pfaedit to my needs (or pointed me to The Right Place in
documentation where I found better way of doing things).

I would like to thank Alexey Novodvorsky (aka AEN), who
pointed me to pfaedit and George Williams' fonts, explained
The Task to me. He is also one of the main participators in the
development of Sysiphus -- free repository of free software.
I didn't loose my time for compiling/installing and supporting
my linux box coz I used the result of Sysiphus developers' works.

I would like to thank Sergey Vlasov, who tested these fonts and reported
about bugs. Also he help me to make some bug-reports to George about
pfaedit bugs.

I would like Dmitry 40in, who did big QA for some font outlines, drawn some glyphs,
and explain some The Truths for me.

I would like to thank Vlad Harchev (aka hvv), who
proofread this text for me.

Also I have to thank RMS for GPL and URW for releasing the fonts
under it.

Thank you very much!
Valek Filippov frob@df.ru
(C)opyLeft 2001
______________________________________________________________________________________
				TODO:
- fix all missed glyphs.
- change suitable glyphs with references.
- improve bearings of glyphs (thanks Dmitry 40in who pointed me to this)
- improve outlines of some cyrillic glyphs 
______________________________________________________________________________________
				Changelog:
2002-11-22  Valek Filippov  <frob@df.ru>

    Fixed bug that broke printing from QT.
    
2002-11-16  Valek Filippov  <frob@df.ru>

   Fixed some cyrillic (russian) glyphs in NimbusMono.
   NimbusMono Ascend/Descend were changed to match the visible
   size of the other font if same point-size is used.

2002-10-12  Valek Filippov  <frob@df.ru>

   Regenerated coz I screwed up UIDs.
   Partly applied Owen Tailor tweaks.
   (Really GWW changed pfaedit autohinter after OT sugggestion,
   so other OT tweaks are aoutomade by pfaedit)
   
2002-08-17  Valek Filippov  <frob@df.ru>

    Regenerated from 9-aug pfaedit version.
    Mostly for testing of new cubic->quad bezier conversion.

2002-07-22  Valek Filippov  <frob@df.ru>

    Regenerated from 22-07 pfaedit version.
    I still haven't enough time for correct serbian glyphs from Danilo
    integration =(

2002-05-19  Valek Filippov  <frob@df.ru>

    Regenerated from 18-05 pfaedit version.
    Restored original UIDs.
    Made otf versions again =)

2002-03-06  Valek Filippov  <frob@df.ru>

    Added pfms. Forced using of original kerning.
    d* and s* files were missed (fixed now).

2002-03-04  Valek Filippov  <frob@df.ru>

    Improved Bookman and Gothic. All fonts were regenerated
    (fix 'Delta', improved hinting). pfms are temporary excluded.

2002-02-03  Valek Filippov  <frob@df.ru>

    Improved Bookman Light/DemiBold. At 2002-01-07 I put
    non latest version of Chancery -- fixed.

2002-01-18  Valek Filippov  <frob@df.ru>

    All fonts regenerated again, coz AEN found bug in names translation.
    NimbusRomNo9-Regu greatly improved. NimbusRomNo9-Bold, NimbusSans{Cond}-{Regu,Bold}
    partially improved.

2002-01-07  Valek Filippov  <frob@df.ru>

    Bookman improved. Chancery added.

2002-01-04  Valek Filippov  <frob@df.ru>

    All fonts were regenerated.
    TTF-instructions were improved, some non-russian cyrillic
    fixed, "fi" and "fl" ligatures ligaturized where were not.
    Implemented some changes that Dmitry suggested,
    NimbusMono-Regular is partially made by him.
    Added COPYING. Generated pfm-files.
    Added fonts.dir and fonts.scale from gnu-gs-fonts.
    
2001-12-14  Valek Filippov  <frob@df.ru>

    Full tarball was made.

    NimbusRomNo9 regenerated. Added 'numero sign',
    'infinity' and 'Omega' (in Regu -- by Dmitry 40in).
    OTF versions removed until the best time.
    Dmitry supposed that URW'd presented 'beta'-version
    of fonts to community, coz bearings for original URW
    are not perfect. 1st attempt to fix it.  

2001-12-12  Valek Filippov  <frob@df.ru>

    Schoolbook extended to 'val3' and regenerated.
    Palladio extended to 'val3' and regenerated.
    Bookman extended to 'val3' and regenerated.
    Gothic extended to 'val3' and regenerated.
    Some glyphs still missed.       

    NimbusMono regenerated with modern pfaedit
    (bug with xterm fixed). Some 0x4** glyphs fixed.
    Added "number sign" and "infinity". Thanks to
    Dmitry 40in and Anton Zinoviev who criticized me
    about it. 

2001-12-08  Valek Filippov  <frob@df.ru>

    Added updated version of NimbusSansCond.
    Changes same like for NimbusSans
    (except: otf version not added).
    
2001-12-07  Valek Filippov  <frob@df.ru>

    Added updated version of NimbusMono.
    (Lat Ext-A, full 0x400 except 'glagolic', some chars are still
     missed; ttf hinting regenerated; otf version added;
     'Cyr De, de, L, l, Ch, ch' fixed).

2001-12-06  Valek Filippov  <frob@df.ru>

    Added updated version of NimbusSans.
    (Lat Ext-A, full 0x400 except 'glagolic', some chars are still
     missed; ttf hinting regenerated; otf version added;
     'Cyr De, de, L, l, Ch, ch' fixed).
    
2001-12-05  Valek Filippov  <frob@df.ru>

    Kern pairs from original URW had missed at the 11-nov version.
    Added OpenType version of fonts.

2001-11-11  Valek Filippov <frob@df.ru>
    
    NimbusRomanNo9
    Regular: added all uni0400 (except ancient cyrillic /glagolic?/).
             04bc-04bf, 04a8-9, 04d8, 04da still missed.
	     added all glyphs from Lat Ext-A (uni0100-017F) that was missed
	     in original URW (45 glyphs).
	     Most of accented chars and part of cyrillics changed
	     with references.
	     TTF hinting regenerated with modern PfaEdit.
    Bold: same but also missed 0494, 04a6, 04c3
    Italic, BoldItalic: same but missed many non-russian cyrillics.
______________________________________________________________________________________
				README.tweaks
Nimbus Sans L Regular, Nimbus Mono L Regular, Nimbus Mono L Oblique
all come from a more recent version of the cyrillic URW fonts.

The hints on Nimbus Sans Regular have been modified in the
following ways:

25 June 2002

 - Added ghost hint to the top of 4 to keep it from being
   taller than the other digits.
 - Reduced the width of the left stem hint for H to 83
   (probably no real differences)
 - Changed the StemSnapV values from [78 85 94] to [78 83 92]
   (and fixed up StdVW accordingly)
   This corresponds to the values in the font (which are 83/93
   for lower case and upper case stems) better and makes
   the width-88 stems on M and N snap to to upper case 
   widths not lower-case widths.

29 June 2002

 - Removed odd vertical stem hints (width of horizontal
   stems) from f, F, t, E, yen sign, fi ligature, 
   fl ligature, AE ligature, R, Lstroke, OE ligature,
   lstroke, E" variants, t, variants, Eth, Dstoke, etc.
 - Fixed hints on 1 to be two ghost hints instead of one
   hint the height of the font
 - fix bottom stem of u to have integer coordinates
 - fixed hints on |
 - fixed hints on inverted exclamation mark

The hints on Nimbus Mono L Oblique have been modified in the
following ways:

 - Removed vertical stem hints from horizontal serifs on
   roman characters.
  
Owen Taylor

[Resource/Font/URWPalladioL-BoldItal Resource/Font/NimbusSanL-Bold Resource/Font/NimbusRomNo9L-Medi Resource/Font/Dingbats Resource/Font/URWChanceryL-MediItal Resource/Font/CenturySchL-Roma Resource/Font/NimbusMonL-Bold Resource/Font/NimbusRomNo9L-MediItal Resource/Font/NimbusSanL-BoldItal Resource/Font/URWGothicL-Demi Resource/Font/StandardSymL Resource/Font/URWBookmanL-DemiBold Resource/Font/NimbusRomNo9L-Regu Resource/Font/URWGothicL-Book Resource/Font/NimbusSanL-ReguCond Resource/Font/CenturySchL-Bold Resource/Font/URWBookmanL-Ligh Resource/Font/NimbusRomNo9L-ReguItal Resource/Font/URWBookmanL-DemiBoldItal Resource/Font/NimbusMonL-ReguObli Resource/Font/NimbusSanL-ReguCondItal Resource/Font/CenturySchL-Ital Resource/Font/URWPalladioL-Roma Resource/Font/CenturySchL-BoldItal Resource/Font/URWBookmanL-LighItal Resource/Font/NimbusSanL-BoldCond Resource/Font/NimbusSanL-BoldCondItal Resource/Font/NimbusMonL-BoldObli Resource/Font/URWGothicL-DemiObli Resource/Font/NimbusSanL-Regu Resource/Font/URWPalladioL-Bold Resource/Font/NimbusMonL-Regu Resource/Font/NimbusSanL-ReguItal Resource/Font/URWGothicL-BookObli Resource/Font/URWPalladioL-Ital]

2008-08-12T23:44:53.919723Z Ray Johnston

Remove 'Actual Fonts' references in the Fontmap that connected the URW FontName
to an 8.3 filename that we no longer use.

[Resource/Init/Fontmap.GS]

2008-08-12T21:04:38.048281Z Ray Johnston

Move opdfread.ps to Resource/Init since this is needed by the 'ps2write' device.

[lib/opdfread.ps Resource/Init/opdfread.ps]

2008-08-12T14:42:02.961911Z Ken Sharp

Fix: Genoa file renders incorrectly with current color code

Details:
A typo in the DeviceGray code used an array of doubles instead of floats, causing incorrect
values to be returned by currenthsbcolor.

[src/zcolor.c]

2008-08-12T13:41:08.386171Z Ken Sharp

Yet another minor change in the color work.

The test file 'foo0-ge-64k.pdf' demonstrated an error with NChannel processing. The old
PostScript based code simply ignored errors when setting the NChannel Colorant spaces, we
now do the same.

[src/zcolor.c]

2008-08-12T09:17:56.269901Z Ken Sharp

Another small change to the color code. The issue Michael has been looking at (#689950)
uses a DeviceN space with an NChannel Colorants dictionary. A mistake in the NChannel
parameter checking meant that the Colorants were never evaluated.

[src/zcolor.c]

2008-08-12T07:37:45.162884Z Igor Melichev

Fix (PS interpreter) : Wrong glyph positions with CIDFontType 2 WMode 1.

DETAILS :

Bug 688058 "Vertical Japanese characters shift upper right direction". 
Bug 689559 "centerline of vertical CJK text is wrong when external TrueType CJK font is used.". 

The old code wrongly computes glyph positions when a CIDFontType 2 WMode 1
font has no metrics and includes vmtx. The patch properly computes
the V vector using top side bearing and font bounding box.
See comments in code.

This patch fixes the glyph positions and closes the original bugs, 
but we still observe other 2 problems with the 688058 test case :

1. 2 characters are substitutes with hollow boxes.
2. pdfwrite generates a PDF with a wrong glyph positions.

Opened bugs 690006, 690007 for them. 

[src/zchar42.c]

2008-08-12T07:35:33.506225Z Igor Melichev

Fix (TT interpreter) : AVector bug workaround was wrong.

DETAILS :

Bug 689820 "rendering of embbeded font with very low quality".

The problem may happens only when a glyph is bigger than [-UnitsPerEm*2, UnitsPerEm*2].
The old code includes a workaround for an antique AVBector bug.
However for detecting it the old code supplied a glyph bbox 
with a wrong coordinate representation (scale).

The test case supplies a glyph, in which some points have x-coordinate
greater than UnitsPerEm*2, so the workaround
converted all curves into lines. 

The patch provides the right bbox data.

[src/ttfmain.c]

2008-08-12T07:31:19.650883Z Igor Melichev

Fix (graphics) : A clist-based pattern supplied a wrong clipping box.

DETAILS :

Bug 689851 "Portions of output missing".

The test document paints an imagemask with a pattern 1 color, 
which contains a Type 1 image, which represents the graphics 
that one can view there.

The pattern appears so big as Ghostscript converts it into a clist.
When rendering the inner image to the clist,
It calls get_clipping_box to know whether the image portion
falls inside the painting area. But the old code
appears to use a wrong implementation of the get_clipping_box method, 
which was inherited from the page clist writer and retrieves the page size.
Here we need the pattern cell size instead the page size.
The patch sets up the right implementation for get_clipping_box.

[src/gxpcmap.c src/gximask.c]

2008-08-12T01:49:02.711432Z Alex Cherepanov

Fix single '~' expansion in generic POSIX persistent-cache implementation.

[src/gp_unix_cache.c]

2008-08-12T01:31:32.498041Z Alex Cherepanov

Fix a potential crash after failed memory allocation in RAM-based command list.

[src/gxclmem.c]

2008-08-12T00:53:52.298682Z Alex Cherepanov

Fix a typo in get_data() macro used by PDF 1.4 composition devices
because the typo caused dependency on the side effect order.

[src/gdevp14.c]

2008-08-11T23:01:09.304118Z Alex Cherepanov

Add a missing break statement after 16-bit Burn blending mode case.

[src/gxblend.c]

2008-08-11T19:11:45.049525Z Ralph Giles

Clean up the configure help entries for optional features.

[src/configure.ac]

2008-08-11T18:58:27.188200Z Ralph Giles

Don't run configure if autoconf failed to regenerate it.

[autogen.sh]

2008-08-11T18:31:30.295468Z Ralph Giles

Add a --disable-cairo option to block linking to libcairo for packagers.
Bug 689999.

[src/configure.ac]

2008-08-11T15:10:06.472831Z Ken Sharp

Further to the PostScript color work, clear up a couple of warnings which exhibit using gcc
on Linux, but not MSVC.

[src/zfunc.c src/zfunc4.c]

2008-08-11T14:16:18.397362Z Ken Sharp

Move the interpretation of PostScript (and PDF) color spaces from PostScript into C. 

DETAILS:
This has required a large number of changes, there are a few new .c or .h files, a
number of PostScript files have been removed, and a few others simplified. A few
documentation '.htm' files have also been modified to reflect these changes.

[src/int.mak src/zpcolor.c src/zicc.c Resource/Init/gs_devn.ps src/zcssepr.c Resource/Init/gs_cspace.ps src/zcie.c src/zicc.h src/zcie.h src/zcspixel.c Resource/Init/gs_lev2.ps Resource/Init/gs_ciecs3.ps Resource/Init/gs_sepr.ps src/zcolor.c src/ifunc.h src/zfunc4.c src/zcsdevn.c src/zcolor.h Resource/Init/gs_patrn.ps src/zfsample.c doc/Develop.htm src/zfunc.c Resource/Init/gs_ll3.ps src/zcsindex.c doc/Psfiles.htm Resource/Init/gs_icc.ps Resource/Init/gs_devpxl.ps src/gscolor2.h Resource/Init/gs_init.ps Resource/Init/gs_devcs.ps Resource/Init/gs_indxd.ps Resource/Init/gs_ciecs2.ps]

2008-08-11T12:19:24.825877Z Ken Sharp

Change the description for the -dNOCIE switch, since it wasn't apparently clear enough
which device spaces were substituted for which CIEBased spaces.

[doc/Use.htm]

2008-08-08T05:39:21.132225Z Ralph Giles

Re-add pdf_draw.ps which was dropped in r8954, since the CET regression
requires it.

[Resource/Init/pdf_draw.ps]

2008-08-08T04:22:38.494595Z Ray Johnston

Massive commit discussed before the freeze to move the PostScript initialization
files to Resource/Init. This obviates the need for geninit when COMPILE_INITS=1.
A followup change will enhance mkromfs to allow it to 'strip' comments and white
space from PostScript input files somewhat reducing the compressed storage needed
for the files in Resource/Init. All files mentioned in int.mak with 'ADDMOD ...
-ps ...' are included as well as those that would have been included via gs_init.ps
%% Replace lines.

Builds tested on Windows and Cygwin for the various executables (gs, pcl6, pspcl6
and gxps).

The default LIBPATH and GenericResourceDir are adjusted accordingly.

[Resource/Init/gs_typ32.ps /trunk/ghostpdl/main/pcl6_gcc.mak Resource/Init src/cfonts.mak lib/gs_dbt_e.ps Resource/Init/gs_dscp.ps lib/gs_statd.ps lib/gs_fapi.ps Resource/Init/gs_devn.ps Resource/Init/gs_agl.ps lib/cidfmap src/iccinit0.c lib/gs_epsf.ps lib/gs_dpnxt.ps lib/pdf_draw.ps lib/gs_icc.ps lib/gs_diskf.ps src/all-arch.mak Resource/Init/gs_fapi.ps lib/gs_init.ps lib/pdf_font.ps lib/gs_ciddc.ps lib/gs_diskn.ps src/ccfont.h lib/pdf_base.ps Resource/Init/gs_dps.ps lib/gs_sym_e.ps lib/gs_btokn.ps Resource/Init/xlatmap Resource/Init/gs_epsf.ps lib/gs_resmp.ps Resource/Init/gs_init.ps src/gs.mak src/wmin.mak lib/gs_wan_e.ps src/Makefile.in Resource/Init/gs_indxd.ps Resource/Init/gs_cidtt.ps src/macos-mcp.mak Resource/Init/gs_img.ps lib/gs_type1.ps lib/pdf_cslayer.ps Resource/Init/gs_setpd.ps lib/gs_dps1.ps Resource/Init/gs_mgl_e.ps src/psromfs.mak lib/gs_lev2.ps lib/gs_pdf_e.ps Resource/Init/gs_fonts.ps src/icfontab.c Resource/Init/gs_mex_e.ps Resource/Init/gs_ttf.ps lib/gs_pdfwr.ps Resource/Init/gs_std_e.ps lib/gs_cidfn.ps /trunk/ghostpdl/common/msvc_top.mak src/geninit.c src/bcwin32.mak src/imain.c Resource/Init/pdf_cslayer.ps lib/gs_ll3.ps lib/Fontmap Resource/Init/gs_dps1.ps src/iccinit1.c Resource/Init/gs_lev2.ps lib/gs_css_e.ps lib/gs_ccfnt.ps Resource/Init/gs_l2img.ps lib/gs_frsd.ps Resource/Init/gs_cet.ps lib/gs_devpxl.ps lib/gs_trap.ps Resource/Init/FCOfontmap-PCLPS2 src/macosx.mak Resource/Init/gs_patrn.ps Resource/Init/pdf_main.ps lib/gs_ciecs2.ps Resource/Init/gs_res.ps Resource/Init/gs_il1_e.ps lib/gs_cidcm.ps lib/gs_cmap.ps src/openvms.mmk lib/gs_typ32.ps Resource/Init/gs_frsd.ps Resource/Init/gs_mro_e.ps Resource/Init/gs_devpxl.ps Resource/Init/gs_devcs.ps Resource/Init/gs_trap.ps Resource/Init/gs_ciecs2.ps Resource/Init/gs_fntem.ps lib/gs_cspace.ps lib/gs_agl.ps Resource/Init/gs_cmap.ps Resource/Init/gs_typ42.ps Resource/Init/gs_cidfm.ps Resource/Init/pdf_rbld.ps src/int.mak lib/pdf_sec.ps src/msvclib.mak src/imainarg.c /trunk/ghostpdl/main/pcl6_msvc.mak Resource/Init/gs_cff.ps Resource/Init/gs_cspace.ps lib/gs_dps.ps src/msvc32.mak src/unix-gcc.mak lib/xlatmap Resource/Init/pdf_sec.ps src/zfile.c lib/pdf_ops.ps Resource/Init/gs_dbt_e.ps Resource/Init/gs_statd.ps lib/gs_indxd.ps lib/gs_cidtt.ps lib/gs_dps2.ps src/unixansi.mak lib/gs_img.ps Resource/Init/cidfmap lib/gs_setpd.ps Resource/Init/gs_dpnxt.ps Resource/Init/gs_icc.ps lib/gs_mgl_e.ps Resource/Init/gs_diskf.ps Resource/Init/pdf_ops.ps src/winint.mak lib/gs_fonts.ps Resource/Init/gs_ciddc.ps Resource/Init/pdf_font.ps Resource/Init/gs_dps2.ps Resource/Init/gs_diskn.ps lib/gs_mex_e.ps lib/gs_ttf.ps lib/gs_std_e.ps Resource/Init/pdf_base.ps lib/gs_resst.ps Resource/Init/gs_sym_e.ps Resource/Init/gs_btokn.ps src/wctail.mak lib/Fontmap.GS src/watclib.mak /trunk/ghostpdl/language_switch/pspcl6_msvc.mak lib/gs_sepr.ps lib/gs_ciecs3.ps lib/gs_l2img.ps Resource/Init/gs_resmp.ps lib/gs_cet.ps Resource/Init/gs_wan_e.ps src/iccfont.c lib/FCOfontmap-PCLPS2 lib/gs_patrn.ps lib/pdf_main.ps Resource/Init/Fontmap.GS Resource/Init/gs_type1.ps lib/gs_res.ps lib/gs_il1_e.ps /trunk/ghostpdl/language_switch/pspcl6_gcc.mak Resource/Init/gs_ciecs3.ps Resource/Init/gs_sepr.ps lib/gs_mro_e.ps Resource/Init/gs_pdf_e.ps lib/gs_devcs.ps src/openvms.mak Resource/Init/gs_pdfwr.ps Resource/Init/gs_cidfn.ps src/watcw32.mak lib/gs_fntem.ps Resource/Init/Fontmap Resource/Init/gs_ll3.ps Resource/Init/gs_css_e.ps src/os2.mak lib/gs_cidfm.ps lib/gs_typ42.ps lib/pdf_rbld.ps src/ugcclib.mak lib/gs_dscp.ps lib/gs_devn.ps lib/gs_cff.ps Resource/Init/gs_cidcm.ps]

2008-08-08T04:03:54.625369Z Ray Johnston

Fix 'rangecheck in showpage' with NumRenderingThreads>0 if the lines requeested do
not range from 0 forward or height-1 backwards. Bug from customer 531 and 850.
Also fix problems with reversion to non-multithreaded rendering with file and memory
based BAND_LIST_STORAGE.

DETAILS:

The 'clist_get_band_from_thread' logic had a known deficiency if the device did not
request lines ranging from the top or bottom of the page. The fix assumes that the
normal direction is from line 0 forward unless the first line requested is the last
line of the page, setting the lookahead_direction. If a request is made for a band
other than the next one in the expected direction, the lookahead_direction is 
reversed and threads are started for the requested band and the bands following in
the new direction. This effectively recovers from an incorrect guess, but since
there is no limit on the number of times that the recovery is performed, also allows
for lines/bands to be requested in arbitrary order.

The customer uses a custom device, but the 'bit' devices were recently enhanced
with -dFirstLine= and -dLastLine= parameters to allow testing.

The re-opening of the clist files was changed to use 'a+' to avoid erasing the
file if multi-threaded rendering was shut down (clist_teardown_render_threads),
and rendering was reverted to single threaded mode.

The memory based clist (BAND_LIST_STORAGE=memory) was supplemented to better
track re-opening and allow for 'a' mode and avoid memory leak of the original
'base' named memfile structure. The customers mentioned above also use the
BAND_LIST_STORAGE=memory for performance reasons (realizing a 10% gain in
throughput over file based clist).

[src/gxclmem.c src/gxclthrd.c src/gxclmem.h]

2008-08-07T19:20:04.322235Z Igor Melichev

Fix (graphics) : Redundant patterns in clist (continued),

DETAILS :

Bug 689995 "segfault with 09-34.PS"

1. (the bug fix) A recent patch doesn't account patterns with no tile,
which represent an empty pattern.  
This change inserts checks for empty tiles
and process them with no optimization (redundantly), 
because they are small and are not cached.
See comments in code.

2. pcls->band_complexity.uses_color accummulated a pattern address bits instead
a real data. This bug was introduced when serializing colors to clist.
nevertheless this bug has no visible effect because 'pure' is overlayed with 
a tile address, which can't be equal to 0 or 0xffffff.
So formally this part of the change is algorithmically equivalent,
but it is important for redability. 

Note that when serializing a pattern to clist, 'uses_color' is not properly
computed and needs further development. see new bug 689997.

Minor change : removed the second call to gs_dc_get_pattern_id for a faster code.

[src/gsptype1.c src/gxclpath.c]

2008-08-07T05:20:08.759100Z Alex Cherepanov

A pointer to allocated memory was used before checking it for 0. This bug
was discovered by Klocwork static code analyzer.

[src/scfd.c]

2008-08-07T00:02:14.784953Z Ralph Giles

Add the PSSRC dir to the includes of contrib devices that depend on
the ps interpreter so they can be build when that directory is different
from src.

[contrib/contrib.mak]

2008-08-07T00:02:13.283150Z Ralph Giles

Use graphics library instead of interpreter error codes in the gomni
device.

[contrib/gomni.c]

2008-08-06T19:57:07.199634Z Ralph Giles

Remove references to malloc/free memory management not used since r8192.

[src/lib.mak src/gsncdummy.c]

2008-08-06T19:51:21.189161Z Ralph Giles

Remove trailing whitespace.

[src/gsncdummy.c]

2008-08-06T19:49:05.961384Z Ralph Giles

Use graphics library instead of interpreter-level rangecheck errors.    

[src/gsncdummy.c]

2008-08-06T18:28:20.524086Z Ray Johnston

Add a capability to select the first and last line to be emitted to the
output file. This was needed to support some customers (531 and 850) that
do something similar in their devices. Adds -dFirstLine=# and -dLastLine=#
to this device. Line numbers are from 0 to height-1, and may be in reverse
order. Probably not much use other than testing, but it doesn't hurt if it
is there.

[src/gdevbit.c]

2008-08-06T07:22:26.679682Z Igor Melichev

Fix (graphics) : Redundant patterns in clist.

DETAILS :

Bug 689865 "clist stores redundant patterns".

The change is pretty simple because the clist reader already implememnts
a pattern cache. We just add pattern id to gx_clist_state
and provide a short format (just the id) when writing and reading
a pattern color to/from clist at second time. A new function gs_dc_get_pattern_id
allows to access the pattern id through closures of color elements.

Note it remembers up to 2 pattern ids for a band
(one for the specific band, and another for "all bands").
A better way would be to remember all patterns cached for a band,
but it would need to save all cached ids individually for each band while clist writing.
We don't want to enlarge the clist writer storage now.

Minor change : Some dependencies of gxclpath.c were missed in makefile. 

[src/gsptype1.c src/lib.mak src/gsptype1.h src/gxcldev.h src/gxclpath.c]

2008-08-06T06:24:44.864622Z Igor Melichev

Fix (graphics) : Memory leak from Indexed color space.

DETAILS :

Bug 689990 "pcl6.exe crash with gs revision 8928".

This change partially unwinds the revision 8928 change
and reopens the bug 89822 "Memory leaks during rendering clist."
See comment in code. 

[src/gscolor2.c]

2008-08-05T20:44:34.621109Z Ralph Giles

Move pointer dereferences to after the NULL check.

[src/ttobjs.c]

2008-08-03T17:54:46.281366Z Alex Cherepanov

Detect and reject PDF files with circular references in the page tree.
Avoid an infinite loop. Bug 689954.

[lib/pdf_main.ps]

2008-08-03T17:23:40.990280Z Ralph Giles

Update ignore list for the ijs directory.

[ijs]

2008-08-03T17:17:10.771824Z Ralph Giles

Clean up the cairo minimum version check introduced in r8929.

[src/configure.ac]

2008-08-03T16:30:42.166329Z Igor Melichev

Fix (graphics) : A slow stroking with big patterns.

DETAILS :

Bug 689966 "c329.bin hang with bitcmyk in clist code".


1. The stroking algorithm includes a branch for a 'faster' rasterizing
with an idempotential color. That branch paints each stroke independently of others.
However that branch doesn't apply an optimization for big patterns,
which the general filling algorithm implements. It caused the too slow rendering,
because a clist-based pattern is played back for each parallelogram.
This change disables the 'faster' srtoking with big patterns,
so that the faster filling algorithm works fine for stroking.

2. Revert the revision 8851 change, which was a temporary workaround for the problem,
The default value for MAX_PATTERN_BITMAP_SIZE is now restored back to 1Mb.

[src/lib.mak src/gxpcmap.c src/gxstroke.c]

2008-08-03T15:47:58.770546Z Alex Cherepanov

Cairo device requires at least v. 1.2.0 of the Cairo library to build.

[src/configure.ac]

2008-08-03T12:26:41.949878Z Igor Melichev

Fix (graphics) : Memory leak from Indexed color space.

DETAILS :

Bug 689822 "Memory leaks during rendering clist."

The finalize function doesn't release 'table,
which is allocated when use_proc == 1.

Minor change : improved a debug printing in gsmchunk.c :
A meanful name is better than an unknown address.
 

[src/gsmchunk.c src/gscolor2.c]

2008-08-03T12:25:39.705021Z Alex Cherepanov

Give a name to a continuation operator %ztoken_continue to avoid printing
its address, which varies between builds and causes spurious regression
reports.

[src/ztoken.c]

2008-08-03T07:49:59.678670Z Russell Lang

Fix the OS/2 build, which was broken because it was trying to use the 
Windows synchronisation code.  
While OS/2 does support thread synchronsation, there is no ghostscript 
implementation for the OS/2 platform, and no interest in writing one.

[src/os2.mak]

2008-08-02T15:10:41.076927Z Alex Cherepanov

Replace a conditional expression with an 'if' statement. The former
requires a prototype for mkstemp64() that is not available on AIX.

[src/gp_unifs.c]

2008-08-01T21:43:44.587346Z Ralph Giles

Document needing to remove autom4te.cache from the jasper directory.

[doc/Release.htm]

2008-08-01T21:43:42.361706Z Ralph Giles

We can no longer run the full build with -dBufferSpace=100000. The
minimum to complete the smoke test seems to be around 120000, but
use 200000 as future insurance.

[doc/Release.htm]

2008-08-01T20:57:40.076512Z Alex Cherepanov

Reduce heap size limit (/Zm) on MSVC6 to fix internal compiler error
when COMPILE_INITS=1.

[src/msvccmd.mak]

2008-08-01T20:55:00.712414Z Ralph Giles

Add a mapping of commit ids to author names.

This is used by split_changelog.py to do the replacement when building 
the History files. The changes to that script to make use of this file
were inadvertently included in r8917.

[doc/AUTHORS]

2008-08-01T20:22:16.068978Z Ralph Giles

Bump the version and product name post-release.

[doc/News.htm toolbin/split_changelog.py lib/gs_init.ps src/gscdef.c src/version.mak]

2008-08-01T18:08:18.641815Z Ralph Giles

Update change logs for the 8.53 release.

[doc/Changes.htm doc/History8.htm doc/Details8.htm doc/Details.htm]