summaryrefslogtreecommitdiff
path: root/psi
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-06-23 15:36:36 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-07-04 09:20:01 +0100
commite784b3314b61f8dfb65e21cd04d7b0ff53251ce1 (patch)
tree1b1b1dcf6f45fd4c3511e6ffc6f40327b5b4a3e0 /psi
parent4422012f6b40f0627d3527dba92f3a1ba30017d3 (diff)
downloadghostpdl-e784b3314b61f8dfb65e21cd04d7b0ff53251ce1.tar.gz
Change how pdfi interacts with FAPI for Truetype fonts
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.
Diffstat (limited to 'psi')
-rw-r--r--psi/zfapi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/psi/zfapi.c b/psi/zfapi.c
index c1d966645..aa7369a1e 100644
--- a/psi/zfapi.c
+++ b/psi/zfapi.c
@@ -2269,6 +2269,7 @@ static const gs_fapi_font ps_ff_stub = {
FAPI_FF_get_raw_subr,
FAPI_FF_get_glyph,
FAPI_FF_serialize_tt_font,
+ NULL, /* retrieve_tt_font */
FAPI_FF_get_charstring,
FAPI_FF_get_charstring_name,
ps_get_GlyphDirectory_data_ptr,