forked from minhngoc25a/freetype2
[cff] Fix minor performance bug.
* src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone calculations are now cached and not recomputed on each glyph.
This commit is contained in:
parent
cc7d35a297
commit
355b359ebb
|
@ -1,3 +1,10 @@
|
||||||
|
2014-02-08 Dave Arnold <darnold@adobe.com>
|
||||||
|
|
||||||
|
[cff] Fix minor performance bug.
|
||||||
|
|
||||||
|
* src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone
|
||||||
|
calculations are now cached and not recomputed on each glyph.
|
||||||
|
|
||||||
2014-02-05 Werner Lemberg <wl@gnu.org>
|
2014-02-05 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
Fix problems with perl 5.8.8 as distributed with current MinGW.
|
Fix problems with perl 5.8.8 as distributed with current MinGW.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Adobe's code for font instances (body). */
|
/* Adobe's code for font instances (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2007-2013 Adobe Systems Incorporated. */
|
/* Copyright 2007-2014 Adobe Systems Incorporated. */
|
||||||
/* */
|
/* */
|
||||||
/* This software, and all works of authorship, whether in source or */
|
/* This software, and all works of authorship, whether in source or */
|
||||||
/* object code form as indicated by the copyright notice(s) included */
|
/* object code form as indicated by the copyright notice(s) included */
|
||||||
|
@ -233,13 +233,14 @@
|
||||||
/* pointer to parsed font object */
|
/* pointer to parsed font object */
|
||||||
CFF_Decoder* decoder = font->decoder;
|
CFF_Decoder* decoder = font->decoder;
|
||||||
|
|
||||||
FT_Bool needExtraSetup;
|
FT_Bool needExtraSetup = FALSE;
|
||||||
|
|
||||||
/* character space units */
|
/* character space units */
|
||||||
CF2_Fixed boldenX = font->syntheticEmboldeningAmountX;
|
CF2_Fixed boldenX = font->syntheticEmboldeningAmountX;
|
||||||
CF2_Fixed boldenY = font->syntheticEmboldeningAmountY;
|
CF2_Fixed boldenY = font->syntheticEmboldeningAmountY;
|
||||||
|
|
||||||
CF2_Fixed ppem;
|
CFF_SubFont subFont;
|
||||||
|
CF2_Fixed ppem;
|
||||||
|
|
||||||
|
|
||||||
/* clear previous error */
|
/* clear previous error */
|
||||||
|
@ -247,8 +248,12 @@
|
||||||
|
|
||||||
/* if a CID fontDict has changed, we need to recompute some cached */
|
/* if a CID fontDict has changed, we need to recompute some cached */
|
||||||
/* data */
|
/* data */
|
||||||
needExtraSetup =
|
subFont = cf2_getSubfont( decoder );
|
||||||
(FT_Bool)( font->lastSubfont != cf2_getSubfont( decoder ) );
|
if ( font->lastSubfont != subFont )
|
||||||
|
{
|
||||||
|
font->lastSubfont = subFont;
|
||||||
|
needExtraSetup = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* if ppem has changed, we need to recompute some cached data */
|
/* if ppem has changed, we need to recompute some cached data */
|
||||||
/* note: because of CID font matrix concatenation, ppem and transform */
|
/* note: because of CID font matrix concatenation, ppem and transform */
|
||||||
|
|
Loading…
Reference in New Issue