Skip to content
This repository
Browse code

WaE: -Wunused-function

  • Loading branch information...
commit fa0353d5e2c718f3741313a21300b32c82f946b1 1 parent 2d78e50
Khaled Hosny authored September 11, 2012
38  fontforge/parsettf.c
@@ -5919,44 +5919,6 @@ static void MMFillFromVAR(SplineFont *sf, struct ttfinfo *info) {
5919 5919
     VariationFree(info);
5920 5920
 }
5921 5921
 
5922  
-static void SFRelativeWinAsDs(SplineFont *sf) {
5923  
-    if ( !sf->pfminfo.winascent_add || !sf->pfminfo.windescent_add ||
5924  
-	    !sf->pfminfo.hheadascent_add || !sf->pfminfo.hheaddescent_add ) {
5925  
-	DBounds b;
5926  
-	CIDLayerFindBounds(sf,ly_fore,&b);
5927  
-	if ( !sf->pfminfo.winascent_add ) {
5928  
-	    sf->pfminfo.winascent_add = true;
5929  
-	    if ( sf->pfminfo.os2_winascent < sf->ascent/8 ) {
5930  
-		/* There was a bug for a while which gave us really bad values */
5931  
-		sf->pfminfo.os2_winascent = 0;
5932  
-		sf->pfminfo.windescent_add = true;
5933  
-		sf->pfminfo.os2_windescent = 0;
5934  
-	    } else
5935  
-		sf->pfminfo.os2_winascent -= b.maxy;
5936  
-	}
5937  
-	if ( !sf->pfminfo.windescent_add ) {
5938  
-	    sf->pfminfo.windescent_add = true;
5939  
-	    sf->pfminfo.os2_windescent += b.miny;
5940  
-	}
5941  
-	if ( !sf->pfminfo.hheadascent_add ) {
5942  
-	    sf->pfminfo.hheadascent_add = true;
5943  
-	    sf->pfminfo.hhead_ascent -= b.maxy;
5944  
-	}
5945  
-	if ( !sf->pfminfo.hheaddescent_add ) {
5946  
-	    sf->pfminfo.hheaddescent_add = true;
5947  
-	    sf->pfminfo.hhead_descent -= b.miny;
5948  
-	}
5949  
-    }
5950  
-    if ( !sf->pfminfo.typoascent_add ) {
5951  
-	sf->pfminfo.typoascent_add = true;
5952  
-	sf->pfminfo.os2_typoascent -= sf->ascent;
5953  
-    }
5954  
-    if ( !sf->pfminfo.typodescent_add  ) {
5955  
-	sf->pfminfo.typodescent_add = true;
5956  
-	sf->pfminfo.os2_typodescent -= -sf->descent;
5957  
-    }
5958  
-}
5959  
-
5960 5922
 static void PsuedoEncodeUnencoded(EncMap *map,struct ttfinfo *info) {
5961 5923
     int extras, base;
5962 5924
     int i;
50  fontforge/splinesave.c
@@ -1191,56 +1191,6 @@ static void _CvtPsSplineSet(GrowBuf *gb, SplinePointList *spl[MmMax], int instan
1191 1191
     SplinePointListsFree(freeme);
1192 1192
 }
1193 1193
 
1194  
-static RefChar *IsRefable(RefChar *ref, int isps, real transform[6], RefChar *sofar, int layer) {
1195  
-    real trans[6];
1196  
-    RefChar *sub;
1197  
-    struct reflayer *rl;
1198  
-
1199  
-    trans[0] = ref->transform[0]*transform[0] +
1200  
-		ref->transform[1]*transform[2];
1201  
-    trans[1] = ref->transform[0]*transform[1] +
1202  
-		ref->transform[1]*transform[3];
1203  
-    trans[2] = ref->transform[2]*transform[0] +
1204  
-		ref->transform[3]*transform[2];
1205  
-    trans[3] = ref->transform[2]*transform[1] +
1206  
-		ref->transform[3]*transform[3];
1207  
-    trans[4] = ref->transform[4]*transform[0] +
1208  
-		ref->transform[5]*transform[2] +
1209  
-		transform[4];
1210  
-    trans[5] = ref->transform[4]*transform[1] +
1211  
-		ref->transform[5]*transform[3] +
1212  
-		transform[5];
1213  
-
1214  
-    if (( isps==1 && ref->adobe_enc!=-1 ) ||
1215  
-	    (/*isps!=1 &&*/ (ref->sc->layers[layer].splines!=NULL || ref->sc->layers[layer].refs==NULL))) {
1216  
-	/* If we're in postscript mode and the character we are refering to */
1217  
-	/*  has an adobe encoding then we are done. */
1218  
-	/* In TrueType mode, if the character has no refs itself then we are */
1219  
-	/*  done, but if it has splines as well as refs we are also done */
1220  
-	/*  because it will have to be dumped out as splines */
1221  
-	/* Type2 PS (opentype) is the same as truetype here */
1222  
-	/* Now that I allow refs to be subrs in type1, it also uses the ttf test */
1223  
-	sub = RefCharCreate();
1224  
-	rl = sub->layers;
1225  
-	*sub = *ref;
1226  
-	sub->layers = rl;
1227  
-	*rl = ref->layers[0];
1228  
-	sub->next = sofar;
1229  
-	/*sub->layers[0].splines = NULL;*/
1230  
-	memcpy(sub->transform,trans,sizeof(trans));
1231  
-return( sub );
1232  
-    } else if ( /* isps &&*/ ( ref->sc->layers[layer].refs==NULL || ref->sc->layers[layer].splines!=NULL) ) {
1233  
-	RefCharsFreeRef(sofar);
1234  
-return( NULL );
1235  
-    }
1236  
-    for ( sub=ref->sc->layers[layer].refs; sub!=NULL; sub=sub->next ) {
1237  
-	sofar = IsRefable(sub,isps,trans, sofar, layer);
1238  
-	if ( sofar==NULL )
1239  
-return( NULL );
1240  
-    }
1241  
-return( sofar );
1242  
-}
1243  
-
1244 1194
 static int IsPSSeacable(SplineChar *sc,int layer) {
1245 1195
     RefChar *ref;
1246 1196
 

0 notes on commit fa0353d

Please sign in to comment.
Something went wrong with that request. Please try again.