summaryrefslogtreecommitdiff
path: root/pcl
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 /pcl
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 'pcl')
-rw-r--r--pcl/pl/plfapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcl/pl/plfapi.c b/pcl/pl/plfapi.c
index 51f7cb1dd..43ab28bca 100644
--- a/pcl/pl/plfapi.c
+++ b/pcl/pl/plfapi.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 Artifex Software, Inc.
+/* Copyright (C) 2001-2022 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -121,6 +121,7 @@ static const gs_fapi_font pl_ff_stub = {
NULL, /* get_raw_subr */
pl_fapi_get_glyph, /* get_glyph */
pl_fapi_serialize_tt_font, /* serialize_tt_font */
+ NULL, /* retrieve_tt_font */
NULL, /* get_charstring */
NULL, /* get_charstring_name */
pl_get_glyphdirectory_data, /* get_GlyphDirectory_data_ptr */