History of Ghostscript versions 9.xx |
---|
This document is a record of changes in Ghostscript releases numbered 9.xx. For earlier versions, see the the history documents:
History of Ghostscript versions 8.n
History of Ghostscript versions 7.n
History of Ghostscript versions 6.n
History of Ghostscript versions 5.n
History of Ghostscript versions 4.n
History of Ghostscript versions 3.n
History of Ghostscript versions 2.n
History of Ghostscript versions 1.n
For other information, see the Ghostscript overview.
This is the fourth full release in the stable 9.x series.
This release includes fixes and solutions for a number of serious problems from the earlier 9.x releases and so we strongly encourage those using earlier 9.x releases to upgrade to this new version, to reap the benefits of those fixes.
In addition, those still using Ghostscript 8.71 and earlier should begin migration to 9.x soon since many improvements, features and fixes from the 9.x versions are impractical to back-port to these legacy versions.
Highlights in this release include:
The txtwrite device has undergone some development, and now has genuine functionality. It accepts any input format which GhostPDL supports, and uses a combination of methods to try and determine the Unicode values for any text contained in the document.
The code descends a hierarchy of methods in this process, starting with the most reliable and only falling back to less reliable methods when better methods fail. The current hierarchy is as follows:
Method 1 is highly reliable, method 4 is a best guess and not terribly reliable, though it will work for many files. It is probably most reliable for PostScript and PCL files.
The device currently has one parameter 'TextFormat' which controls whether the output is Unicode text reflecting the layout of the original document (-dTextFormat=0) or a format intended for use by developers which includes the Unicode text and some formatting information, such as the size and position of the text, and the font in use (-dTextFormat=1).
Note that his device does not do OCR (Optical Character Recognition) it is not capable of finding 'text' which is part of an image. However it will recover the 'invisible' text from PDF documents which have been scanned and OCR'ed by Acrobat for searching. Such text has a render mode of 3.
This is the first release of this code and is very much an alpha release, we expect problems.
In particular the TextFormat=0 output is likely to be incorrect, and will only work with top-to-bottom left-to-right text. It will probably also be confused by landscape documents printed on portrait media.
TextFormat=1 should be more reliable, but there may be cases where text is dropped from the output. Text in PostScript documents using charpath is not yet supported for example.
We do encourage feedback on the state of this device, and would be interested in hearing what kind of output would be useful for developers using TextFormat=1. For now, however, please do not raise bugs through Bugzilla, instead please send feedback to the gs-devel mailing list.
This release introduces some experimental build-time optional support for UNICODE pathnames on Windows. Essentially this works by following the model that Linux (and MacOS) have followed for years.
If this code is enabled, then the way ghostscript handles command lines, registry settings, file accesses and other api calls with top bit set characters in (i.e. codes >= 128) will change. The net benefit of this change is that ghostscript will now be able to cope with accessing files with unicode characters (i.e. codes >= 256) in their pathnames.
This behaviour is all completely transparent to users, with the exception of those calling the gsapi functions with strings including 'extended ascii' (i.e. characters with codes >= 128 and <= 255). These characters include accented latin characters, such as u + umlaut, a + grave etc. The changes required for code that is affected by this are relatively minor, but as this is a change to the current API, we are announcing it in advance, and inviting comments.
As of the 9.04 release, the code is disabled. For those who wish to experiment you will need to build Ghostscript from source, and either pass USEUNICODE=1 when you invoke nmake or edit psi/msvc.mak to remove the /DWINDOWS_NO_UNICODE option from CFLAGS.
WARNING: Our intention, subject to feedback, is to enable this by default in near-future releases (hopefully, the next major release). If you make use of the affected APIs you should be prepared for the change to occur - be aware, however, that the current code is experimental and, depending on the feedback we get, maybe subject to change.
NOTE: this whole change refers to file paths, command line parameters and so on - it does not imply that we have unilaterally extended Postscript to understand UNICODE.
More details:
To give an example, suppose we have a file 'EXAMPLE' we'd like to invoke ghostscript on, where 'EXAMPLE' is actually a string that contains some characters with codes >= 128.
On Linux (or MacOS X), when ghostscript is called from a shell, e.g.
gs EXAMPLE
the command is UTF8 encoded; this means that characters with codes < 128 are left unchanged, and characters >= 128 are encoded into multiple bytes. This encoded string is then passed to the standard 'main' entrypoint in the gs executable.
Ghostscript proceeds internally without any special handling of these multibyte characters at all. When it comes to access files it therefore passes out the UTF8 encoded strings to the standard OS file handling routines. These routines are designed to take pathnames in UTF8 format, and thus the files are accessed as normal.
If the Ghostscript executable outputs these (or other) strings to its stdout, the shell again converts the output from UTF8 back to unicode in order to display it.
The net effect is that the caller can seamlessly pass in unicode filenames, has his fileaccesses work out and gets unicode output without the core of ghostscript ever having to worry about it.
The code change discussed here endeavours to make Windows follow the same pattern as closely as possible.
When Windows executables are invoked, they can either be called through an 'ascii' entrypoint (main), or through a unicode ('wide') entrypoint (wmain). The difference is invisible to the caller, except that unicode executables can accept characters >= 256 in their invocations.
The new code changes ghostscript from being an ascii executable to being a unicode one. The Windows specific outer layer takes the unicode command string and UTF8 encodes it before passing it to the ghostscript core.
Similarly, the Windows specific filing system calls are updated to accept utf8 encoded strings from the core, and to convert them to unicode before operating on them.
The Windows gui app (gswin32.exe, NOT gswin32c.exe) is also updated to convert stdin/stdout between unicode and utf8 as appropriate, allowing unicode strings to be copied/pasted to/from other apps.
All of this should be completely transparent to the user, and no code changes should be required. The one area where changes may be required are where ghostscript is invoked through the gsapi functions.
Currently, on Linux (and MacOS X) any strings sent over the gsapi are assumed to be utf8 encoded (and thus can represent any Unicode character). On Windows, they are assumed simply to be in extended ASCII (and can therefore represent any character < 256 in the current codepage). With the proposed change, Windows will move to be in step with Linux. No differences will be caused to anyone who only uses chars <= 128, but those people using character codes between 128 and 256 (or indeed wanting to use higher codes) will need to utf8 encode the strings before calling gsapi functions.
Such encoding/decoding is a very simple process, and code for both directions can be found in psi/dwmain.c, psi/dwmainc.c and psi/dwtext.c.
Again, we welcome feedback on this feature, in this case problems or suggestions about the implementation can be submitted via Bugzilla but for detailed discussion about the approach for which we opted, it would be more beneficial discuss it (preferably) on our IRC channel #ghostscript on freenode.net, or on the gs-devel mailing list.
For a list of open issues, or to report problems, please visit bugs.ghostscript.com.
Deprecated file "gs/base/errors.h" removed, psi/ierrors.h should be used instead.
The eXternal Fonts (XFonts) functionality, marked as deprecated in 9.02 has now been fully removed.
No other recorded incompatible changes.
2011-08-04 14:40:12 +0100
2011-08-04 10:05:13 +0100
2011-08-03 17:44:55 +0100
2011-08-01 16:28:52 +0200
2011-07-30 17:48:14 +0100
2011-08-01 12:18:25 +0100
2011-08-01 13:05:09 +0200
2011-07-30 11:56:53 +0200
2011-07-29 14:01:58 -0700
2011-07-29 12:18:04 -0700
2011-07-29 08:14:04 -0700
2011-07-29 10:12:26 +0100
2011-07-29 09:40:34 +0100
2011-07-28 22:28:37 -0600
2011-07-28 17:16:35 +0100
2011-07-28 17:08:58 +0100
2011-07-28 15:07:14 +0100
2011-07-28 10:21:31 +0100
2011-07-27 22:12:41 -0700
2011-07-27 16:25:19 +0100
2011-07-27 22:14:10 +0200
2011-07-27 20:37:20 +0200
2011-07-27 10:41:14 -0700
2011-07-27 09:14:04 -0700
2011-07-26 12:16:04 -0700
2011-07-25 22:42:34 -0700
2011-07-25 19:03:42 -0600
2011-07-25 12:34:59 -0600
2011-07-26 13:15:44 +0100
2011-07-25 16:25:20 +0100
2011-07-25 16:19:19 +0100
2011-07-25 09:05:05 +0100
2011-07-25 08:44:42 +0100
2011-07-24 16:03:31 -0400
2011-07-24 16:38:35 +0000
2011-07-20 23:28:19 -0700
2011-07-22 10:36:36 -0700
2011-07-21 20:42:33 +0100
2011-07-22 23:27:18 -0400
2011-07-21 21:50:59 -0700
2011-07-21 16:40:21 +0100
2011-07-19 20:02:50 +0100
2011-07-20 15:24:58 -0400
2011-07-20 20:03:02 +0000
2011-07-20 10:29:47 -0700
2011-07-20 11:43:40 -0700
2011-07-20 18:24:31 +0000
2011-07-20 14:48:55 +0100
2011-07-20 14:36:10 +0100
2011-07-19 21:57:35 -0600
2011-07-19 17:12:23 +0100
2011-07-19 10:05:14 +0100
2011-07-18 10:46:05 -0700
2011-07-18 17:07:08 +0100
2011-07-17 09:45:35 -0700
2011-07-18 12:52:55 +0100
2011-07-16 15:22:03 +0000
2011-07-16 12:58:35 +0000
2011-07-15 20:03:50 -0600
2011-07-15 18:46:37 +0100
2011-07-15 10:42:30 -0700
2011-07-15 15:12:02 +0100
2011-07-15 14:35:04 +0100
2011-07-15 12:51:00 +0100
2011-07-15 08:57:45 +0100
2011-07-15 08:51:36 +0100
2011-07-15 07:01:39 +0100
2011-07-14 14:19:37 -0700
2011-07-14 16:07:03 +0100
2011-07-14 10:08:02 +0100
2011-07-14 10:03:35 +0100
2011-07-13 14:34:32 -0700
2011-07-13 10:08:29 -0700
2011-07-12 19:26:21 -0700
2011-07-12 14:07:22 -0700
2011-07-12 20:11:46 +0100
2011-07-12 19:15:33 +0100
2011-07-12 17:28:45 +0100
2011-07-12 06:50:46 -0700
2011-07-11 09:22:20 +0100
2011-07-11 09:14:34 +0100
2011-07-10 13:14:04 -0700
2011-07-10 12:54:02 -0700
2011-07-10 12:19:33 -0700
2011-07-10 09:39:21 -0700
Chris Liddell
e173d22697b5489624783a805311337d053e53fe
Bug 691586: again, ensure that GS knows when cups changes the media size
Move the fix for Bug 692393 to immediately after the call to
gdev_prn_put_params() - before the call to gx_device_set_media_size()
as that can also change the device's width and height settings.
With this fix, I have also removed the temporary workaround put in place
with commits 16c410fc29575abffb60926949433653186915fd and
bd33c8f57b1a6e3d365ef0efd8dd7571a14310fa.
No cluster differences.
gs/cups/gdevcups.c
Chris Liddell
6fc00870dd9d1e17709b532f425578b229a61544
Revise Luratech section of build docs.......
... to reflect that we now look for the Luratech code under
gs/luratech/ldf_jb2 and gs/luratech/lwf_jp2 instead of gs/lwf_jp2 and
gs/ldf_jb2
CLUSTER_UNTESTED
gs/doc/Make.htm
Chris Liddell
a26ed9754118ab5a6027346f2e4d0c41077dfc1c
Bug 692393: ensure GS realises cups changed the page dimensions.
After having done media selection from the cups media list, we need to
ensure that GS realises that page dimensions in the device structure
may have changed since the raster memory was last created - this ensures
that GS will reallocate the memory, and correctly setup the
line_ptrs array for the new page size.
No cluster differences.
gs/cups/gdevcups.c
Till Kamppeter
e6f2128efc15316a586813ff314bc037b1d36856
Fixes on the gstoraster CUPS filter
1. gstoraster crashes when run outside CUPS (bug #692384)
2. All error messages issued by gstoraster are without newline (bug #692385)
Thanks to Tim Waugh from Red Hat for the patches.
gs/cups/colord.c
gs/cups/gstoraster.c
Robin Watts
9fcefea7e6e770efed7a237c3fc0e8649fba342a
Fix bug 692349: UNICODE build of gs not available with VS2003 or VS6.
Apply a slightly tweaked version of alexchers patch to define wmemset
when it's not provided by the headers.
No cluster differences expected.
gs/psi/dwtext.c
gs/psi/msvc.mak
Robin Watts
690a9464f7a7ff524519587b95ba8505b0f823d9
Tweak to tkampeters previous commit to workaround bug 691586.
Avoid warnings given on some platforms about "unreachable code" by
using an informative #define.
No cluster differences expected.
gs/cups/gdevcups.c
Till Kamppeter
b4c67383d9e71b468b5384b7a63095864d3a9ae7
CUPS Raster output device: Ignore RIP_MAX_CACHE environment variable
Ghostscript is (at least currently) not able to work with hard-limited
space parameters. It crashes with a segmentation fault on many input
files then. Leaving the setting of these parameters fully automatic
Ghostscript works just fine. As in most distributions (Currently all
except Debian, Ubuntu, and their derivatives) CUPS imposes a hard
limit via the RIP_MAX_CACHE environment variable, the only way to
assure reliable working of Ghostscript is to ignore the parameter,
leaving the space parameters in automatic mode. For CUPS this should
be no regression, as print queues with other Ghostscript drivers (like
pxlcolor, ljet4, ...) worked without hard limits all the time and no
one complained.
To ignore this RIP_MAX_CACHE we simply add a "return" right at the
beginning of this function. It will be removed when a real fix gets
into place.
See http://bugs.ghostscript.com/show_bug.cgi?id=691586
gs/cups/gdevcups.c
Till Kamppeter
83abb6ca67829a1273ed4fdfc894a6af44c5c5ad
Added "-dNOINTERPOLATE" to the Ghostscript command lines of the CUPS filters
This makes rendering significantly faster and the output of normal
files comming as print jobs from applications does not show any
visible difference.
gs/cups/gstoraster.c
gs/cups/pstopxl.in
Michael Vrhel
83c7aba31ab324d015a39ec23ab9eb861c23d787
Another fix for cups RGBW. This gets the color set up properly for RGB.
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/cups/gdevcups.c
Michael Vrhel
db4b6b6d07c2b4a97bd0add6e3169874ec2d1af7
Fix for cups RGBW color space so that transparency works properly.
gs/cups/gdevcups.c
Michael Vrhel
d1d700d4d052e3a9a061e5d6c61e3a4a30e5135d
A test for fixing RGBW in gdevcups.c
gs/cups/gdevcups.c
Chris Liddell
43f6fff7185f868104f6ba4afc102af4f9fe8f3f
Update the docs, version numbers, and dates for 9.04 rc1
gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pdfopt.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1
pl/pl.mak
Chris Liddell
d248b98753421668ca683d074709a9422267b9ba
Change the expected directory for luratech.
For the build system to automatically include the luratech JPX and JBIG2
code, we previously checked for the existence of lwf_jp2 and ldf_jb2
directories under the Ghostscript source dir. This changes it to check
for
CLUSTER_UNTESTED
gs/base/configure.ac
gs/psi/msvc.mak
Henry Stiles
ea57ffb4eb8e3c2bd9ae80547cd7ad011631e212
Restore X11 device to the default unix device.
In setting up autoconf to detect X11 (9b7298f) the X11 devices were
not put back at the beginning of the device list and so were no longer
the default device.
main/pcl6_gcc.mak
Robin Watts
c1cfbc2655dce2a1c3cc73caf0af54a51db61bfe
Changes to lcms v1 to spot failed allocations.
lcms v1 sometimes forgets to deal with failed allocations. Patch at
least some of these problems.
Driven by bug 692352. Sufficient to make it run to completion now.
gs/lcms/src/cmsgmt.c
gs/lcms/src/cmslut.c
gs/lcms/src/cmsps2.c
gs/lcms/src/cmssamp.c
gs/lcms/src/cmsvirt.c
gs/lcms/src/cmswtpnt.c
gs/lcms/src/cmsxform.c
Robin Watts
0f6629c581fb56ca33fb7ec57d757ea96f236887
Check for failure to allocate icclink in shading.
When calling shade_init_fill_state, check for a return code to indicate
failure. Trigger this case when an attempt to allocate an icclink
fails.
No cluster differences expected.
gs/base/gxshade.c
gs/base/gxshade.h
gs/base/gxshade1.c
gs/base/gxshade4.c
Robin Watts
f31edd69e23236fbae4b986883df8e0f43f15af6
Fix typo in rc_decrement description string.
Simple typo fix. CLUSTER_UNTESTED.
gs/base/gxclrast.c
Changelog
Chris Liddell
2364173a3ea2ac1e58b53a68e775d98157035b03
Disable the Windows UNICODE/UTF8 code for now.
CLUSTER_UNTESTED
gs/psi/msvc.mak
Michael Vrhel
cf056ad9ccf42b8c31e6c84ed0ee6d30e0fb7455
Update of Use.htm to include new color control options.
gs/doc/Use.htm
Robin Watts
12faa934ff19d95f08fc9db33d7a6b288ba67ee2
Fix Bug 692368; SEGV with clist transparency pattern in clist rendering.
The invocation/file given in the bug uses banded rendering (clist).
While drawing a band, it uses a pattern with transparency, that is
itself rendered by a clist (using the new pattern clist code).
A fill rectangle is being done that tries to call the pattern clist
tiling code without the fill_trans_buffer having been setup, and
this causes a SEGV.
The reason for this appears to be that the device used by the
banded isn't a pdf14 device - instead it's a clipper device wrapping
the pdf14 device. The clipper device does not call gx_forward_fill_path,
but instead calls gx_default_fill_path, meaning that the special
pdf14 handling done to setup the fill_trans_buffer isn't done.
Making the commit call onwards to gx_forward_fill_path doesn't solve the
problem either, as that results in no actual clipping being done.
The fix, therefore appears to be to implement a clipping version of
fill_path.
No cluster differences expected.
gs/base/gdevp14.c
gs/base/gxclip.c
gs/base/gxclip.h
Till Kamppeter
3639f0da216f0472658b37ee96726b80abdc7d56
Fixed the problem that PCL-XL output files got huge after introduction of color management
The pxlmono and pxlcolor output devices produce PCL XL (PCL 6). With
the introduction of color management, the size of the output files
often got 10 times larger as before and so PCL XL jobs often did not
print as they exhausted the memory of the printer.
According to the contributor of this patch, Shailesh Mistry, the PDFs
leading to that problem have a DeviceRGB image which is translated
into an ICC profile and passed up but the pcl/pxl can not handle
it. This patch looks for incoming ICC profiles and resolves it into
the base colour which can be handled at this level.
The patch returns the size of the PCL XL output files to the old
values from Ghostscript 8.x.
Fixes bug 692329.
gs/base/gdevpx.c
Till Kamppeter
d6e940a92e47f0110438cf2f9bd6ebffa2f9e211
Fixes on the "pstopxl" CUPS filter
1. Use POSIX and not Perl regular expressions with sed. This makes the
script working on a wider scope of systems (Bug #692328).
2. Switch the Ghostscript output device "pxlmono" if the "pxlcolor" is
used but "Gray" chosen as "ColorModel" setting. Monochrome
"BitsPerPixel" settings do not work with "pxlcolor".
gs/cups/pstopxl.in
Michael Vrhel
fead331855bddda90406d220e84fe5a284b2daa9
Fix for Windows Display Device showing gray only
This returns the use of DeviceGrayToK=true/false to set
if the user wants DeviceGray to map to K only for a
CMYK device. Also, this fixes a problem where high
level gray scale images were always going to composite
an not K only. Bug 692204.
gs/base/gsdparam.c
gs/base/gsicc_manage.c
gs/base/gxclrast.c
gs/psi/zdevice.c
Michael Vrhel
dc18980047abde427405973a6c9452959fb8e93c
Replacement of default gray ICC profile with Artifex generated versions
I reviewed the bmpcmp results and the relatively few diffs are minor.
gs/iccprofiles/default_gray.icc
gs/iccprofiles/sgray.icc
Michael Vrhel
cdbc852a9220c324b9094c448e29ce3548a5b8c3
Change of Default CMYK profile to one created by us to emulate V2 SWOP with reduced footprint.
Reviewed differences from this commit. With bmpcmp -16 the diffs amounted to halftone differences
with nothing visible.
gs/iccprofiles/default_cmyk.icc
Michael Vrhel
dca23749d5222c591927e78fd4f79a8d649ecd7c
Change of default_rgb.icc to our own sRGB ICC profile.
This results in very minor color diffs in a few files. I reviewed the diffs and everything is fine.
gs/iccprofiles/default_rgb.icc
gs/iccprofiles/srgb.icc
Henry Stiles
ba7054ed86bdb26c1c19aad0d5a4313e8b96c4df
Fixes 692360 - the x11cmyk get bits procedure would only work properly
with a client supplied data pointer.
gs/base/gdevxalt.c
Henry Stiles
2ed6a01d99cc63f9953be1e29b9d05643e9ada73
Fixes 689502 - remove obsolete scripts.
CLUSTER_UNTESTED
gs/lib/bdftops
gs/lib/bdftops.bat
gs/lib/bdftops.cmd
gs/lib/bdftops.ps
gs/lib/fixmswrd.pl
gs/lib/pv.sh
Chris Liddell
7ec7b1463507ba578e123dc15f4219472a09930f
Bug 691956: make installing the cups tools optional
Introduces a --with-cups-install option to configure. To include the
cups tools and associated data files in Ghostscript's "install" target
you will have to specify "--with-cups-install" at configure time.
No cluster differences.
gs/base/Makefile.in
gs/base/configure.ac
gs/cups/cups.mak
Chris Liddell
f62ce181e3a68d7f652d9e903c70bd1a67423782
Bug 692367: NULL out pointers for three tables in the context
Add "finalize" methods for gs_name_table, io_device_table and
font_dir tables which ensure that the pointers in the lib
context are set to NULL when the memory is released.
No cluster differences.
gs/base/gsfont.c
gs/base/gsiodev.c
gs/base/gsstruct.h
gs/base/gxfcache.h
gs/psi/iname.c
Ken Sharp
7dee8c1639a55e5b6ae4051afcfed9caa82e48b5
Remove the last traces of OPDFReadProcsetPath
The old Procsets had to be moved from PostScript resources to C files, in order that
ps2write work with non-PostScript interpreters (XPS, PCL). As a result the
old OPDFReadProcsetPath is no longer used and has been removed.
gs/Resource/Init/gs_pdfwr.ps
gs/base/gdevpdf.c
gs/base/gdevpdfb.h
gs/base/gdevpdfp.c
gs/base/gdevpdfu.c
gs/base/gdevpdfx.h
Ken Sharp
1562de0f7dc0615ed1397f42a7ad0eb23f4dcf22
Add some minimal documentation regarding the txtwrite device to devices.htm.
gs/doc/Devices.htm
Ken Sharp
4e6a7b5c6fc0c202ba0d962cd19578162e1ce726
Add functionality to the textwrite device.
The existing textwrite device was a null device which emitted nothing. This
version actually extracts text from input documents. It uses ToUnicode CMaps,
GlyphNames2Unicode tables and glyph names in an attempt to map incoming text into
Unicode (UTF-16) values.
It currently has one switch 'TextFormat' which has two possible values, 0 or 1.
-dTextFormat=0 outputs a 'layout' representation of the original text. This
will attempt to produce text output which is similar in appearance to the original.
-dTextFormat=1 simply emits all the text as it is encountered, along with information
about the text state. It outputs the Font name, point size, rendering mode and
writing mode (WMode) as well as the start and ending co-ordinates of the text on the page
and the Unicode string representing the text. This is intended for those who
would like to manipulate the text into other formats.
The Adobe Glyph Names list is now embedded in the executable twice, in two
incompatible forms. A future enhanvement will be to only embed the list once.
gs/base/gdevagl.h
gs/base/gdevtxtw.c
Alex Cherepanov
128b9fce26e82ef38cedded8fc35a4c99ef55bee
Fix a trivial Valgrind warning.
Reorder a logical expression to prevent the access to an unitialized
value. The only effect of the patch is some noise reduction in the
Valgrind log.
gs/base/gdevp14.c
Robin Watts
961a9a98ecff7a30503ee0bd5d2973263114def7
Backout commit 7f5d3d7; 8 bit display device palette change.
Reverting earlier commit made to attempt to fix bug 692235. While
this change does give the display device a much nicer palette
to work with in 8 bits, it will break with all code that currently
exists to interface to the display device, such as gsview, as the
palette is not exported with the data.
Due to the looming release and the questions remaining to be answered
on the bug, we pull the change for now.
gs/base/gdevdsp.c
gs/psi/dpmain.c
gs/psi/dwimg.c
gs/psi/dxmain.c
pl/dwimg.c
Ray Johnston
68bf978d614ec610333abd6a51b88fc3e05689f7
Fix compiler warnings.
Check return code from "get_profile" dev_proc in gs_nulldevice.c and get rid of the
implicit declaration for gdev_mem_set_planar.
gs/base/gsdevice.c
gs/base/gxpcmap.c
Michael Vrhel
d3302b1176683dc9e4cb5cb8ed9f42bffa0888ee
Fix for bug 692204. This forces DeviceGray to K only for CMYK devices.
This is performed by default now. To return to a composite type mapping
that makes use of the true DeviceProfile, use the option -dDeviceGrayToK=false.
This commit includes a fix to rename the device member variable
icc_array to icc_struct to reduce confusion in reading the code.
gs/Resource/Init/gs_lev2.ps
gs/base/gdevp14.c
gs/base/gdevpdfk.c
gs/base/gdevtfnx.c
gs/base/gdevtsep.c
gs/base/gdevvec.c
gs/base/gdevxini.c
gs/base/gscms.h
gs/base/gsdevice.c
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_cache.h
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gslib.c
gs/base/gxclthrd.c
gs/base/gxcmap.c
gs/base/gxdevcli.h
gs/base/gximag3x.c
gs/iccprofiles/gray_to_k.icc
Robin Watts
7f5d3d7b298bbabc13a484e38e749d572d817bc8
Fix bug 692235: Rendering to 8bit colors shows bad colors.
The display device uses an RGBK space for 8 bit rendering. Currently
this corresponds to a palette of 96 colors; 2 bits each for R,G,B,
supplemented by 16 greys.
This review alters it to use a 6x6x6 RGB cube, supplemented by 40 grey
levels.
In fact, this is slightly wasteful as we repeat the black and white
representations as color and as greyscale, but it's a huge improvement
on what we had before.
No cluster differences expected as we don't test the display device.
gs/base/gdevdsp.c
gs/psi/dpmain.c
gs/psi/dwimg.c
gs/psi/dxmain.c
pl/dwimg.c
Alex Cherepanov
4c2a089d0378402f374cb9004ac0faa3ff82d3c3
Bug 692361, trap errors produced by --token--
Thap errors thrown by --token--, adjust the stack, and rethrow.
Rev. 4c6809dfa1c539d757c30f572922e05cd1436698 made the errors
that occur during reading of the contents steam recoverable,
but missed the case, when the error happens in the --token--.
gs/Resource/Init/pdf_base.ps
Michael Vrhel
9d37cdcdbcb3b3bb23d0eab06d1683735303d5e1
Fix for bug 692364 in which we were were not handing the initial DeviceGray profiles correctly
When the graphic state is started, the color spaces are first set to DeviceGray. In certain documents
this is then the color space that is used for drawing and in fact the erase page will initially
occur with this color space. If I have a destination ICC profile like CIELAB, then this is
a problem since we will end up mapping DeviceGray to RGB with the old procedures giving us a
CIELAB value of [255 255 255] which is a very bright red. With this fix we in the
DeviceGray mapping we fix the colorspace to be ICC based and pass then handle the procedure with
the ICC mapping. A minor fix was also needed in the pdf14device put_image where we use a
DeviceGray color space, which happens to have an ICC profile. We now correctly create the
ICC profile. Note that this will cause significant diffs in the cluster push as DeviceGray
colors that were mapped to pure K before for a CMYK device (due to the fact that we were not
installing the proper color space) will now map to composite black. This
issue will be addressed shortly by another commit where we by default map all DeviceGray
colors to K only in the CMYK devices.
gs/base/gdevp14.c
gs/base/gxcmap.c
gs/base/lib.mak
Robin Watts
554ce829a9eb59da437541e2efbc646d9edc2805
Fix Bug 692355; gswin32 has garbage chars in window title bars.
Existing ghostscript includes windows.h without defining UNICODE, but
calls the unicode versions of functions where appropriate. Here we
move to defining UNICODE before including windows.h, but we keep to
the practise of calling A or W specific variants as much as possible.
Partly this is because of time before the release, but mostly a fear
that this might lead to a Pandoras box of changes.
gs/psi/dwtext.c
gs/psi/dwtext.h
Robin Watts
c9a8f8b3b0327bb62fc79cfe93d6bd79f997a2b6
pdf14 'dirty' rect optimisations.
Rename 'bbox' to 'dirty' - makes the purpose of the field much clearer.
Export dirty rectangle pointer in gx_pattern_trans_t structure.
Remove automatic expansion of 'dirty' rects to full rect boundary.
Ensure tiling code sets dirty rectangle as expected.
Remove debugging printfs.
Testing shows 491 differences. 16 or so real changes (all neutral or
progressions), but most of them in the cups device. Manual testing
shows no changes at all - no idea what's going on there.
gs/base/gdevp14.c
gs/base/gdevp14.h
gs/base/gxblend1.c
gs/base/gxp1fill.c
gs/base/gxpcolor.h
Alex Cherepanov
4a1159926a8094f19bcacddf0503b5a06edd9184
Bug 692362, tolerate stream object without stream.
Check for the case, where the modified stream dictionary is missing
/File attribute (probably, because the original stream object was
missing the stream body) and substitute an empty stream.
gs/Resource/Init/pdf_base.ps
Robin Watts
145a853a0f9ed9d58b76413a5c77aa026500af93
Add finalize function to pattern clist device.
This may need to do more than it does, but the immediate drive for
this is to correctly drop the reference count on the target device
on closedown. This is sufficient to stop the SEGV seen on the final
garbage collection done on stars.pdf.
The garbage collector was finding an unfreed pdf14 device, and stepping
into the target onto to find that the target had been destroyed already.
No cluster differences shown in testing.
gs/base/gxpcmap.c
Ray Johnston
10cd4a92cd64252635c3c7f9a189f857bc59bf97
Fix for missing ICCProfilesDir during some device init. Move profiledir to gs_lib_ctx.
The business of trying to keep the profile directory in the device and keeping it in
sync with the value used in the icc_manager led to problems when some devices were
initialized. This change moves the profiledir (and its len) into the gs_lib_ctx_t
(pseudo- global) which is accessible by the icc_manager and devices via the
gs_memory_t pointer.
Remove the no longer needed functions to set and sync the profile in the device and
replace gsicc_set_icc_directory with gs_lib_ctx_set_icc_directory.
Thanks to Michael Vrhel for adding to this patch to make it build on linux and
build the other parsers.
gs/base/gscms.h
gs/base/gsdevice.c
gs/base/gsdparam.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gslibctx.c
gs/base/gslibctx.h
gs/base/lib.mak
gs/base/msvclib.mak
gs/psi/int.mak
gs/psi/zdevice.c
gs/psi/zusparam.c
pcl/pctop.c
psi/psitop.c
pxl/pxpthr.c
pxl/pxtop.c
svg/svgtop.c
xps/xpstop.c
Michael Vrhel
b07cfe2e168d004ed1a4365e985d90c88fa61725
Fix for Bug 692074. Make sure the ht thresholding code writes out device white and device black.
This should also fix a polarity issue that we had with the plank device.
gs/base/gxht_thresh.c
Robin Watts
9a91acb5411b457383e59ed4bbefeb0247862228
Reverse the polarity of cups 'gray' colorspaces.
Cups colspace 0 is the inverse of colspace 3.
gs/toolbin/bmpcmp.c
Chris Liddell
467b64692f0b74244fd0bc0748309d05b2f09294
Remove the eXternal Fonts functionality.
The XFonts feature was of very limited utility these days, and
was deprecated a couple of releases ago. This commit removes
the unloved and rather bit-rotten feature completely.
This does not really "fix" Bug 692357, but renders it pointless.
No cluster differences.
gs/base/devs.mak
gs/base/gdevmac.c
gs/base/gdevmac.h
gs/base/gdevmacxf.c
gs/base/gdevx.c
gs/base/gdevx.h
gs/base/gdevxini.c
gs/base/gdevxres.c
gs/base/gdevxxf.c
gs/base/gxccache.c
gs/base/gxccman.c
gs/base/gxchar.c
gs/base/gxchar.h
gs/base/gxfcache.h
gs/base/macos-mcp.mak
gs/doc/Xfonts.htm
Chris Liddell
5ca50b1770ae583490954f1546b17bad421fbc9f
Bug 692359: Retain WMode from CMaps embedded in PDFs
The read_CMap procedure skips everything in the embedded
CMap file stream except the actual character ranges (as does
Acrobat), thus we lose the WMode setting (if present) from
the stream. Nor were we propagating the value from the PDF
CMap stream dict.
This revision ensures we propagate the WMode value the PDF
CMap stream dictionary (if present), which matches Acrobat's
behaviour.
No cluster differences.
gs/Resource/Init/pdf_font.ps
Henry Stiles
a46123967e919fdd557411d2b0d177e6be2722e3
Fixes 692234 premature erasepage.
The page was being erased before the postscript interpreter was
properly initialized. In particular for the crash in this bug a
default halftone has to be installed before erasepage.
psi/psitop.c
Robin Watts
a6ec8697315e39dabd565a1ca114d3b42f006324
Small Memento tweaks.
When moving a block to the tail of the freelist, ensure that its next pointer
is set to NULL.
When doing 'setParanoia' ensure that any existing countdown is reset.
No cluster changes.
gs/base/memento.c
Chris Liddell
923d5ca0673442a9e8d4921812ac4fbd75433140
Fix a warning I introduced, and a couple of others
gs/base/gdevpng.c
Michael Vrhel
9ed6be44e85f03f4a22064b698b3c0ea8c818b53
Fix so that rendering intent makes it properly through clist along with expanded RI capabilities
This fixes bug 692139, also adds support for the ability to override the
internal rendering intent(s) with an externally set rendering intent. Also,
it is possible to specify specific rendering intents for RGB graphics, images
and text as well as CMYK graphic images and text. Progressions occur in the
regression test suite. In particular the file icc_rendering_intent.pdf at 300dpi
now renders correctly.
gs/base/gscms.h
gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gxclimag.c
gs/base/gxclpath.c
gs/base/gxclrast.c
gs/base/lib.mak
Chris Liddell
385f519d34703ba88d107649fb59452617590194
Remove the PNG_INTERNAL define from the PNG device.
PNG_INTERNAL being defined exposes libpng's internal APIs which we should
certainly not be using, and do not appear to. I'm guess that this was
done to work around an issue in an earlier libpng version, and is no
longer relevant.
No cluster differences
gs/base/gdevpng.c
Ray Johnston
44a2fd0bb1e2dd12e9ba475da0bdbb93081325d5
Fix crashes and assertion on 32-bit Windows builds. Bugs 692347, 692348.
Thanks to SaGS for these fixes. Assertion and crash were found during final checkout of
the 9.03 release, as well as on the master branch. Partly these problems came from the
UTF-8 changes.
VS treats the "char" type as signed by default. When extended characters are promoted
to ints, the values are negative in the range -128 to -1. These values (except -1
which conflicts with EOF) are not valid for the "is*()" family of functions.
For GS_ registry entries that are not set, the utf8 version of 'gp_getenv_registry()'
incorrectly returned an 'insufficient buffer space' verdict and let the 'needed
buffer size' to 0 (cbData = 0 after 'RegQueryValueExW()'). The call to fetch the
value was then made also with a 0-sized buffer, did the same thing, and left the
buffer for the value undefined. There were also other problems, for example
non-REG_SZ entries were ignored only when the value was actually requested (not
during the request for the buffer size) and the function was doing 'free(wp)' with
wp == NULL in a few cases.
No cluster differences.
CLUSTER_UNTESTED
gs/base/gp_wgetv.c
gs/base/gsargs.c
Robin Watts
80f11f7c17fd2d58eded8e8721a6932a0384f5f5
Fix plane calculations in planar pattern management.
The calculation of the depth/shift to use depth in planar pattern management
was wrong due to a silly typo.
This doesn't make it work, just solves an obvious problem.
No cluster differences expected.
gs/base/gxpcmap.c
Robin Watts
ed9ba4062880109265bf286cb2e3fdc7527fe841
Pattern accumulator changes to support planar output devices.
When creating the memory buffer for a painttype 1 pattern tile, check
to see if the underlying device is planar - if it is, then create the
memory buffer as planar too.
The code to tile out the planar pattern buffers still needs fixing, but
this allows halftoning jobs to run to completion at least.
No cluster differences shown.
gs/base/gxpcmap.c
Robin Watts
a438a9f7d363f76013e1c614fc0818fe081875ad
Fix pattern cache tile accounting.
When putting tiles into the pattern cache, we estimate the size we need
up front (or in the clist case, calculate it exactly). We then clear
that many bytes in the pattern cache, and add the new tile using that
estimated size. When we come to evict we recalculate the exact size and
evict based on that.
This causes a mismatch whereby the pattern cache thinks it has the wrong
number of bits cached. When this is an underestimation, we just end up
using more memory than we'd like. When it overestimates however, we can
get into an infinite loop trying to evict things.
The fix is to record the number of bits we've accounted for in every
tile and thus always count the same coming out as we did coming in.
If we really want to account for the correct values rather than the
estimate we can do that, but we must adjust pcache->bits_cache and
ctile->used appropriately.
No bug associated with this, but it was triggered by a forthcoming
commit to make the pattern accumulator use planar buffers for planar
devices.
No differences in cluster testing.
gs/base/gsptype1.c
gs/base/gxpcmap.c
gs/base/gxpcolor.h
Henry Stiles
9b7298f794a4d9bdf5f2bc9dd8401cbfa458a018
Autoconf changes for X11 and threads.
config.mak.in
configure.ac
main/pcl6_gcc.mak
Chris Liddell
10fa3cdcae73e526d6279e5a70522d821d08469d
Set the defines needed to build luratech on WIN64
CLUSTER_UNTESTED
gs/psi/msvc.mak
Michael Vrhel
bfc0768f53bf96acfbbcf184fe83a09d85b4f5b4
Addition of an destination ICC profile for demonstrating the setting of rendering intent
gs/toolbin/color/src_color/cmyk_des_renderintent.icc
Chris Liddell
2472633cba1418733d079dea15f624c3649bf6dc
Fix the shared library builds.
The corrected dependencies in lib.mak broke the shared lib bulids,
so the rules needed split up to cover the shared and non-shared
cases.
gs/base/configure.ac
gs/base/gs.mak
gs/base/lib.mak
Chris Liddell
b0277439b2de03cfcae9282f02021bec72aaa91a
Resolve a build issue with 64 Windows.
CLUSTER_UNTESTED
gs/base/msvctail.mak
Robin Watts
9be999c3d781ff92b5498d8cc89b0d2c1fcdc69e
Fix crashes due to uninitialised reschedule and time_slice procs.
Freek Kempe reports problems when ghostscript is built with just
psl3 and pdf FEATURE_DEVS, due to the context entries for
time_slice_proc and reschedule_proc being uninitialised.
We take on a (very slightly modified) version of his suggested fix;
they are now initialised to a dummy procedure, and can be overridden
by zcontext_init later if required.
No cluster differences seen.
gs/psi/icontext.c
Chris Liddell
7d56fdb732eda354c1c0ccd53e62306caf4f600f
Small formatting change for the html changelog
gs/toolbin/gitlog2changelog.py
Chris Liddell
fc670d3f5dd1e066a838165acec54b2859b1ed78
Increment the Ghostscript version number to 9.04.
gs/Resource/Init/gs_init.ps
gs/base/version.mak
Chris Liddell
7e299cc60681c53113f513f95a940ef0349219f9
Fix an error in the Win64 building of genarch.exe
It was using AUXDIR instead of AUX for the path.
CLUSTER_UNTESTED
gs/base/msvctail.mak
Michael Vrhel
f98534e2952fb2c2bfa5a3604233d69c76713a41
Addition of support to override the document specified rendering intent(s)
Also this includes fixes so that if the source color profiles are specified
the rendering intents associated with those will be used.
gs/Resource/Init/gs_lev2.ps
gs/base/gscms.h
gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/psi/zusparam.c
Chris Liddell
fb5f2b5f317f9df6a1258ba53c17da84292cafee
Small fix to changes for Bug 688528.
The fix for Bug 688528 contained a conditional error checking for
a return value of greater than zero when in fact it should be
greater than or equal to zero.
No cluster differences.
gs/base/gdevvec.c
Chris Liddell
7694aad7c0d84ea8c95acff6ca9b189016c280d1
Revise error/warning on PDF missing CIDFont.
Now that GS will attempt to continue interpreting a PDF after an error
in a given content stream, revise the message we emit when he hit a
missing CIDFont in a PDF condition to reflect that. If PDFSTOPONERROR
keep the previous message.
Also, add a "flush" at the end of each message to ensure they don't get
mangled by later, high priority messages.
No cluster differences.
gs/Resource/Init/pdf_font.ps
Chris Liddell
62ce501c977ae1a6cb5c38dac545616111c51ed2
Compile out the Unicode path/parameter code with VC7 and before
Visual C 7 (Visual Studio 2003) and earlier do not have all the "wide char"
related library functions needed for the Windows Unicode path and
parameter handling, causing a link error.
So when building with VC7 and earlier, leave out the Unicode stuff.
No cluster differences.
CLUSTER_UNTESTED
gs/psi/msvc.mak
Michael Vrhel
ed92ea1c85f7ee188d0ab242e72ca2f220367ed8
Addition of ICC profile for demonstrating use of rendering intent on source color
gs/toolbin/color/src_color/cmyk_src_renderintent.icc
Ray Johnston
880f2b2b80ce8f1506b2ec9d81ba73737dfaa4af
Add flush after -sGenericResourceDir warning message.
I often have seen this message get garbled by having other messages on stderr "jump in"
so that the message on stdout gets split up. The "flush" prevents that.
gs/Resource/Init/gs_res.ps
Michael Vrhel
46db3bca63834ae3b3881022fbc9300de8690d10
Fix so that when the null device is installed it is initialized with the proper icc directory
This fixes issues on windows when going to the bbox device but there are still issues on linux.
gs/base/gsdevice.c
Michael Vrhel
6b237cb27450a0d09ad982bd45e2e15829ae974f
Addition of code to support source color management dependent upon the graphic type
Also fix of the example file that demonstrates this feature.
gs/base/gscms.h
gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gxclimag.c
gs/examples/text_graph_image_cmyk_rgb.pdf
Chris Liddell
a06634a969ea9b0db2d0840d8641847247056145
Update autoconf build and the Windows build to use Luratech
if the directories are found where we expect.
Include options on each build to disable using Luratech explicitly.
Document the change in Make.htm
No cluster differences.
gs/base/Makefile.in
gs/base/configure.ac
gs/doc/Make.htm
gs/psi/msvc.mak
Chris Liddell
15d3904a43b2dddda12ed842000d9668c2aff8d7
Add a simple git log to html changelog script.
CLUSTER_UNTESTED
gs/toolbin/gitlog2changelog.py
Chris Liddell
89de03454ba02713403571cb1cdd1312ae818f81
Bug 692338: address performance regression in FAPI
Previously I changed FAPI to only dispose of the outline or
bitmap part of the Freetype glyph, intead of the entire
internal glyph object, so as avoid freeing, re-allocating
and initialising a glyph object for every glyph. That seemed
to cause a memory leak, so I reverted it.
This commit does it properly, addresing the memory leak by
correctly freeing the memory that Freetype returns to us
*containing* the pointer to the bitmap or outline, as well
as the bitmap/outline data.
This is measurably quicker than the previous method.
No cluster differences expected.
gs/psi/fapi_ft.c
Michael Vrhel
b6a234634d7987890851cb4375e0520ba8dd0750
Addition of code to support override of internal ICC profiles
gs/Resource/Init/gs_lev2.ps
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/psi/zicc.c
gs/psi/zusparam.c
Chris Liddell
99cbbdaad585b78dfd32db6dc59c08f9743d8d6a
Add debugbin to the list of directories to ignore.
CLUSTER_UNTESTED
gs/toolbin/localcluster/clusterpush.pl
Chris Liddell
ee688b964bee8f9562ce92835b2478f88b0dbe31
Bug 692327: Support libpng 1.5.x API
Revise to support the latest libpng API, conditionally compiled based on
the PNG_LIBPNG_VER_MINOR.
No cluster differences expected.
gs/base/gdevpng.c
Michael Vrhel
d1a349055450612218848e8d15fb6c1a4cc22f5b
Addition of pdf example file to demonstrate source color graphic object control
gs/examples/text_graph_image_cmyk_rgb.pdf
Michael Vrhel
2065f62ecb27abd974803207a0be160264944401
reorganization of files for demonstrating source color control based upon graphic type.
gs/toolbin/color/icc_creator/effects/cmyk_src_cyan.icc
gs/toolbin/color/icc_creator/effects/cmyk_src_magenta.icc
gs/toolbin/color/icc_creator/effects/cmyk_src_yellow.icc
gs/toolbin/color/icc_creator/effects/rgb_source_blue.icc
gs/toolbin/color/icc_creator/effects/rgb_source_green.icc
gs/toolbin/color/icc_creator/effects/rgb_source_red.icc
gs/toolbin/color/src_color/cmyk_src_cyan.icc
gs/toolbin/color/src_color/cmyk_src_magenta.icc
gs/toolbin/color/src_color/cmyk_src_yellow.icc
gs/toolbin/color/src_color/objsrc_profiles_example.txt
gs/toolbin/color/src_color/rgb_source_blue.icc
gs/toolbin/color/src_color/rgb_source_green.icc
gs/toolbin/color/src_color/rgb_source_red.icc
Michael Vrhel
213fd2eb89c8a818c546cb888fde6bb67d481c07
Addition of special effect ICC CMYK source profiles
A set of CMYK based profiles for demonstrating the usage of source
color graphic object type dependent color management
gs/toolbin/color/icc_creator/effects/cmyk_src_cyan.icc
gs/toolbin/color/icc_creator/effects/cmyk_src_magenta.icc
gs/toolbin/color/icc_creator/effects/cmyk_src_yellow.icc
Michael Vrhel
f24c2cb3f3e030068e48b9c608ebf87e70679547