You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/10/04 17:14:22 UTC
svn commit: r1529178 - /openoffice/trunk/main/vcl/source/fontsubset/sft.cxx
Author: hdu
Date: Fri Oct 4 15:14:22 2013
New Revision: 1529178
URL: http://svn.apache.org/r1529178
Log:
#i123417# handle subsetting of empty ttf compound glyphs gracefully
Modified:
openoffice/trunk/main/vcl/source/fontsubset/sft.cxx
Modified: openoffice/trunk/main/vcl/source/fontsubset/sft.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/fontsubset/sft.cxx?rev=1529178&r1=1529177&r2=1529178&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/fontsubset/sft.cxx (original)
+++ openoffice/trunk/main/vcl/source/fontsubset/sft.cxx Fri Oct 4 15:14:22 2013
@@ -799,7 +799,10 @@ static int GetCompoundTTOutline(TrueType
} while (flags & MORE_COMPONENTS);
-
+ // #i123417# some fonts like IFAOGrec have no outline points in some compound glyphs
+ // so this unlikely but possible scenario should be handled gracefully
+ if( myPoints.empty() )
+ return 0;
np = myPoints.size();
@@ -2787,7 +2790,7 @@ GlyphData *GetTTRawGlyphData(TrueTypeFon
/* now calculate npoints and ncontours */
ControlPoint *cp;
n = GetTTGlyphPoints(ttf, glyphID, &cp);
- if (n != -1) {
+ if( n > 0) {
m = 0;
for (i = 0; i < n; i++) {
if (cp[i].flags & 0x8000) m++;