Bug 687780 - optimize nobbox_draw
Summary: optimize nobbox_draw
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows XP
: P3 enhancement
Assignee: Chris Liddell (chrisl)
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2004-10-27 23:51 UTC by Igor Melichev
Modified: 2011-07-13 08:46 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
gsbug-2.ps (10.20 KB, application/postscript)
2004-10-27 23:53 UTC, Igor Melichev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Melichev 2004-10-27 23:51:50 UTC
First we generate a character outline andapply the grid fitting. Then 
nobbox_draw computes the path bbox and checks rect_within(bbox, pbfont-
>FontBBox). If not (it is so with cxs.present == metricsSideBearingAndWidth),
it enhances FontBBox and restarts all again. Thus zchar_set_cache, the type 1 
interpreter and the type 1 hinter are called 2 times, and type1_exec_init is 
called 4 times due to the sbw callout. Also zchar_get_metrics2 may be called 
with no reason when there is no CDevProc.

Actually we could do all in a single pass if set up the cache device after we 
compute the grid-fitted outline. As a consequence possibly we could drop 
gs_text_retry.
Comment 1 Igor Melichev 2004-10-27 23:53:51 UTC
Created attachment 1003 [details]
gsbug-2.ps

A test file with a single glyph to reproduce the problem. It is made form the
test file of the bug 687614. The original test file of the bug 687614 is useful
for debugging Metrics with the optimized algorithm.
Comment 2 Shailesh Mistry 2011-07-11 20:47:50 UTC
Fixed in Ghostscript 9.03
Comment 3 Chris Liddell (chrisl) 2011-07-13 08:46:35 UTC
Effectively, this is fixed with the FAPI/Freetype integration.