diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-01-28 15:16:01 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-10-12 14:20:40 +0100 |
commit | 044be76d47368fd6a284df3b645bdb1a050fd102 (patch) | |
tree | dd08c288657543d5177b71f36ce235f5834ad5f4 /pcl | |
parent | 33fb16a8fc9fb973d33be3d0324c95eaea80d29c (diff) | |
download | ghostpdl-044be76d47368fd6a284df3b645bdb1a050fd102.tar.gz |
Revise FAPI integration in PCL code.
Originally, the FAPI code held a buffer of the full font data, for the duration
of the life of the font object.
Given that the entire font set is memory resident, three times over, for the
life of the interpreter(s), that ends up holding quite a lot of memory.
This changes it so it uses the font data read directly from the romfs (rather
than read into a persistent memory buffer). To maintain performance, we now
store the PCL fonts uncompressed in the romfs. This grows the binary from
25Mb to 29Mb.
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/pl/plfont.c | 4 | ||||
-rw-r--r-- | pcl/pl/plromfs.mak | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pcl/pl/plfont.c b/pcl/pl/plfont.c index 6fe045e2c..c2cd2ff65 100644 --- a/pcl/pl/plfont.c +++ b/pcl/pl/plfont.c @@ -1148,9 +1148,7 @@ pl_load_tt_font(stream * in, gs_font_dir * pdir, gs_memory_t * mem, if (code < 0) goto error; - code = - pl_fapi_passfont(plfont, 0, NULL, NULL, plfont->header + 6, - plfont->header_size - 6); + code = pl_fapi_passfont(plfont, 0, NULL, (char *)file_name, NULL, 0); if (code < 0) goto error; if (file_name) diff --git a/pcl/pl/plromfs.mak b/pcl/pl/plromfs.mak index c6d2de56b..16753118d 100644 --- a/pcl/pl/plromfs.mak +++ b/pcl/pl/plromfs.mak @@ -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 @@ -17,6 +17,6 @@ # This needs a file on its own due to the required include ordering # in the top level makefiles. -PCLXL_FONT_ROMFS_ARGS=-c -P $(PLSRCDIR)$(D)..$(D)urwfonts -d ttfonts /*.ttf +PCLXL_FONT_ROMFS_ARGS=-b -P $(PLSRCDIR)$(D)..$(D)urwfonts -d ttfonts /*.ttf PCLXL_ROMFS_ARGS= |