diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-06-23 15:36:36 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-07-04 09:20:01 +0100 |
commit | e784b3314b61f8dfb65e21cd04d7b0ff53251ce1 (patch) | |
tree | 1b1b1dcf6f45fd4c3511e6ffc6f40327b5b4a3e0 /xps | |
parent | 4422012f6b40f0627d3527dba92f3a1ba30017d3 (diff) | |
download | ghostpdl-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 'xps')
-rw-r--r-- | xps/xpsfapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xps/xpsfapi.c b/xps/xpsfapi.c index 5d8ae533a..88feff3c0 100644 --- a/xps/xpsfapi.c +++ b/xps/xpsfapi.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 @@ -84,6 +84,7 @@ static const gs_fapi_font pl_ff_stub = { NULL, /* get_raw_subr */ xps_fapi_get_glyph, /* get_glyph */ xps_fapi_serialize_tt_font, /* serialize_tt_font */ + NULL, /* retrieve_tt_font */ NULL, /* get_charstring */ NULL, /* get_charstring_name */ xps_get_glyphdirectory_data, /* get_GlyphDirectory_data_ptr */ |