summaryrefslogtreecommitdiff
path: root/base/fapiufst.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Strip trailing whitespace from .c and .h files.Robin Watts2020-09-091-7/+7
|
* Revisions to FAPI (error handling etc).Chris Liddell2020-06-171-62/+185
| | | | | | | | | | | | | | | | | | | | A lot of the FAPI methods made no account for errors (i.e. a call to return an unsigned 16 bit value would return an unsigned short int). In various places that meant we ended up using unlikely (in practice, impossible, yet still "valid") values to indicate an error condition. This commit changes those calls to have a conventional Ghostscript "int" return value and (mostly) take pointer to the storage into which they should write their value. We can now return meaninful error codes. Secondly, in several places, the FAPI methods and code used integers to store character codes, cids, gids etc. This is less than ideal because we potentially have to handle 4 byte codes (especially for gids), and we also use some special 64 bit values (when available) for specific meanings. There were several workarounds for that, in various places. This commit also changes the FAPI API and code to the gs_glyph type for all such values, removing the need for those workarounds
* Tweak fapiufst code to build with UFST 7.1.xChris Liddell2020-05-201-2/+2
|
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Fixed leak on error in gs_fapi_ufst_init() (found by memento).Julian Smith2020-02-141-1/+3
| | | | | Fixes: MEMENTO_FAILAT=22 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Bug 698767: Improve handling of multiple master fontsChris Liddell2018-04-111-1/+13
| | | | | | | | | | | | The FAPI API didn't really handle the possibility that multiple master fonts could change (via setweightvector) without a call to definefont/setfont etc. We now allow two ways for FAPI to handle this: if the scaler in force allows it, we'll set the new weight vector, and carry on as before. If the scaler does *not* allow us to change the weight vector "on the fly", we'll destroy the scaler's font object and related data, and recreate it with the new weight vector in the font dictionary.
* Bug 699158: Tidy up a validation checkChris Liddell2018-04-051-15/+4
| | | | | | | | Use a cleaner check to ensure UFST only gets passed Microtype fonts (from .fco font collections). Not sure what I was thinking when I wrote the original check, but it was clearly a bad code day!
* Update copyright notice with new head office address.Ken Sharp2018-01-301-3/+3
| | | | | | | | | Also update copyright dates. Remove gs_cmdl.ps as we no longer use it, and remove its entry from psfiles.htm. Remove xfonts.htm as this feature (xfont support) is long, long gone.
* Change allocator initialization.Chris Liddell2016-04-271-1/+1
| | | | | | | cppcheck reckoned the pointer to the memory allocator (cmem) could possibly be a NULL pointer dereference (in fact, that's not true). But a simple tweak to how cmem is initialized can prevent the error arising.
* Improve logability of errors.Robin Watts2016-02-181-10/+10
| | | | | Ensure that we always return_error(gs_error_blah) rather than just return gs_error_blah.
* Bug 696363 & 696362: wrong error code return.Chris Liddell2015-11-191-1/+1
| | | | | | | | The FAPI/UFST code was returning a "limitcheck" error when no glyph raster was available, when it should have been "unregistered". This caused problems when I added the return code checks to address some Coverity warnings.
* Bug 696149: tweak under/overflow prevention in FAPI/UFSTChris Liddell2015-08-181-3/+3
| | | | | | | | | | | | Due to limits of the fixed point arithmetic in the UFST, we have to balance various scale factors at extreme scales (scale matrix, font size, "resolution") to ensure varaibles don't over/under flow. It looks like there was a typo, or just a mistake in how two of the factors were being scaled relative each other which could cause *extremely* small scale factors to end up as *extremely* large scale factors. No cluster differences.
* Bug 696101: fix uses of the sfopen API.Chris Liddell2015-08-061-1/+1
| | | | | | | | | | | The stream API in GS is defined as *always* opening files in binary mode, where applicable, so there is no need for the API clients to specify binary mode. This is previously been benign, and thus ignored, but reportedly ending up with a duplicate 'b' character in the mode causes a crash on Windows 10. No cluster differences.
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+2218
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.