| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PDF, only symbolic Truetype fonts draw marks from the glyph at GID zero
(the TTF notdef). But the default TTF notdef is an empty rectangle, rather than
the Postscript style non-marking glyph.
The FAPI/Freetype incremental interface integration includes code to spot that
case, and return an empty glyph.
Since PDFs don't do incremental font definitions, the pdfi code simply passed
the TTF into FAPI, and onto Freetype as a complete font, so all the glyph
lookups were handled inside Freetype, not using the incremental interface.
Thus we lost the ability to do that "filtering".
Equally, we don't want to take the time to break down the font and "reassemble"
it as the Postscript interpreter is forced to do.
This implements a hybrid approach where we still pass the font data unchanged
into Freetype, but we still use the incremental interface, allowing that
notdef filtering to happen.
This commit affects a heuristic in freetype which autmatically enables
autohinting, meaning we'll no longer get autohinting in cases where we
previously did. That gives a perceived drop in quality at low resolutions.
Since autohinting can be enabled at the command line, it's not a serious
concern.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
(for the pdfi branch)
|
| |
|
|
|
|
|
|
|
|
|
| |
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 how gstate initialisation is done:
Previously we relied on the imager state being a subset of the gstate (thus
assigning an imager state to a graphics state over wrote to the entries
common to both, and didn't overwrite any already set graphics state specific
entries).
Making the imager and graphics states the same means that approach doesn't work,
so this changes it to initialise the entries individually.
Renames gsistate.c->gsgstate.c and gxistate.h->gxgstate.h
Cleanup and fix the gs_state gc stuff.
Uses different check for pre/post clist pdf14 device
Previously, the code used "is_gstate" in the imager/graphics state object
to determine if the code was being called pre or post clist (post clist would
only ever have had an imager_state so is_gstate = false).
With no imager state any more, that test would no longer work (and I am dubious
about whether it was really safe, anyway). Other places check for the presence
of a clist reader device in the pdf14 device structure - so use that here
too.
Adds initial (NULL) value for show_gstate pointer in gs_state.
Removes the now pointless macro for the contents of the graphics state
Changes function names that had "imager" to use "gstate"
Removes the redundant 'is_state' flag
Cleans up gs_(g)state_putdeviceparams():
Previously we had to similar routines: one took a graphics state, and used the
device from the graphics state, the other took an imager state and the device
as an explicit parameter.
With the removal of the imager state, "merge" those two functions
Replaces gs_state with gs_gstate
It makes for less confusion as it really is a g(raphics)state
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correctly maintain "design_grid" parameter in the font/matrix pair
structure, for FAPI handled TTFs.
Change a "return" to a "return_error".
Retrieving glyph metrics was sub-optimal as my original implementation used
a gs_text_process() call, which uses the entire "show machinery".
This implementation calls gs_fapi_do_char() directly. This has several benefits:
we only need a "skeleton" text enumerator, and a "skeleton" graphics state,
cutting down the local overhead setup. We also cutout a whole lot of setup
done as part of gs_text_begin() and during gs_text_process() itself. Finally,
we avoid a lot of "stuff" related to showing entire strings, when we're only
ever handling a single glyph at a time.
A final optimisation is in the FAPI/FT code: if we're just retrieving metrics,
we no longer take the action of retrieving the glyph from FT - which is not
a very cheap operation.
This commit causes ~100 cluster tests to have pixel shift differences.
|
|
All languages take a -dDisableFAPI option which reverts to the AFS code.
On Unuix type systems
./configure --disable-fapi
and on Windows, adding "FT_BRIDGE=0"
create builds without the FAPI font handling.
Both of these will be removed as the FAPI code matures.
Move Font API from psi into base.
Split the FAPI functions into the interpreter dependent ones, and the "core"
functions. Move the core functions into the graphics library.
Change fapi.dev to fapi_ps.dev
Since the old fapi.dev is now split into core and PS dependent parts, the
old fapi.dev gets renamed as fapi_ps.dev
Basic TrueType support thru FAPI for pcl and pxl.
Doesn't include artificial boldening.
Basic FAPI functions working with XPS interpreter.
(Mostly) Make PCL/UFST work through gs_fapi API
Bug 693188: don't skip glyphs with degenerate matrices
In commit 752397ab, the fix for Bug 692263 was to skip over glyphs when the
matrix in force for the glyph had a zero scale in either dimension.
It seems that this approach had potentially unfavourable side effects in the
glyph cache.
So, when we encounter a degenerate matrix rendering a glyph, we now force a
minimal, non-zero scale before attempting to render the glyph. This placates
the glyph cache.
Cluster testing shows (tiny) progressions in Bug689006.pdf, Bug690179.pdf,
and Bug692634.ps, and pixel differences, not identifiable as progressions
or regressions in Bug690497.pdf and 12-07C.PS.
Conflicts:
gs/psi/fapiufst.c
gs/psi/ifapi.h
gs/psi/zfapi.c
Revise gs_fapi_available and zFAPIavailable so they can check for
a specific fapi server being available (as well as just fapi itself being
available.
Tidy up header includes, and header dependencies.
Typos, warnings and dependency mistakes.
Handle FAPI having no servers gracefully in PCL and XPS
Use existing API to retrieve glyph metrics.
Fix some PCL/PXL spacing problems.
Improve handling of notdefs in PCL/PXL
Some reformatting.
Update fapi call in xps and fix some merge mistakes.
Change gs_fapi_do_char() parameters to gs_glyph and gs_char types.
Handle GS_NO_CHAR value better.
Remove deprecated char_code entry
Provide method for client to request ttf cmap in fapi.
Skip "unencodable" glyphs (that is character codes whose "decoding" results
in a gs_no_glyph glyph value).
Fix (finally, I think) the PCL notdef problems, and PCL text orientation.
Also, a GL spacing problem. Amend the Postscript size to work with these
changes.
FAPI API and warnings clean up.
Identify glyph index or otherwise....
...in the FAPI PS world.
fix a missing dependency
Include stdint_.h in gxfapi.h....
so int64_t is available. Add dependency.
Fix typo in dependency.
Changes to build gs_fapi on Windows.
Fix a typo
<sigh> another "notdef" handling revision
Add PCL/XL glyph boldening (bitmap smearing) to FAPI.
Remove some debug code accidentally left in.
Provide a "-dDisableFAPI" command line option for pcl/pxl/xps.
It's added in a very noddy way for two reasons: it needs acted upon
before the interpreter is initialised, and second to make it more
obvious to remove when we've gained confidence in the new fapi code.
Split fapi server builds out of lib.mak and into separate makefiles.
Add one commercial server build to the Ghostscript/GhostPDL build system, so
it no longer needs built separately.
Also fix a couple of dependency typos/errors.
Some tweaks to get the build changes working on Windows
Delete makefile....
Revise build changes.
Cluster differences in every PCL/PXL/XPS file with text display in a Truetype/Opentype font (including CFF).
|