summaryrefslogtreecommitdiff
path: root/xps/xpsfapi.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2013-10-03 15:15:53 +0100
committerChris Liddell <chris.liddell@artifex.com>2013-10-10 11:29:56 +0100
commit68fa228ade5d2f7496b96676aaa1f82be4584362 (patch)
treed2067a8f4c0c6b173c8e8249bedaebd6cf87c10b /xps/xpsfapi.c
parent83565d8264e96312df8c26055aaa0e23e57c4c8d (diff)
downloadghostpdl-68fa228ade5d2f7496b96676aaa1f82be4584362.tar.gz
Bug 694519: improve PCL performance with FAPI
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.
Diffstat (limited to 'xps/xpsfapi.c')
-rw-r--r--xps/xpsfapi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xps/xpsfapi.c b/xps/xpsfapi.c
index d81abb75f..968ad8747 100644
--- a/xps/xpsfapi.c
+++ b/xps/xpsfapi.c
@@ -62,6 +62,7 @@ static const gs_fapi_font pl_ff_stub = {
false, /* is_outline_font */
false, /* is_mtx_skipped */
false, /* is_vertical */
+ false, /* metrics_only */
{
{3,10}, {3,1},{3,5},{3,4},\
{3,3},{3,2},{3,0},{1,0},