Skip to content
This repository
Browse code

Eable type3/multilayer unconditionally

  • Loading branch information...
commit c0b45fa7fd2b16bb5918461671e0e94970e5aae3 1 parent 6d2e5bb
Khaled Hosny khaledhosny authored

Showing 50 changed files with 35 additions and 634 deletions. Show diff stats Hide diff stats

  1. +0 11 README-MS.html
  2. +0 13 README-Mac.html
  3. +0 11 README-Unix.html
  4. +0 22 fontforge/charinfo.c
  5. +0 15 fontforge/charview.c
  6. +0 12 fontforge/configure-fontforge.h
  7. +1 8 fontforge/cvexport.c
  8. +3 22 fontforge/cvimages.c
  9. +0 11 fontforge/cvimportdlg.c
  10. +4 62 fontforge/cvpalettes.c
  11. +0 3  fontforge/cvstroke.c
  12. +1 50 fontforge/cvundoes.c
  13. +0 6 fontforge/diffstubs.c
  14. +2 22 fontforge/dumppfa.c
  15. +0 6 fontforge/exelibstamp.pre
  16. +0 27 fontforge/fontinfo.c
  17. +1 25 fontforge/freetype.c
  18. +2 19 fontforge/fvfonts.c
  19. +0 2  fontforge/fvimportbdf.c
  20. +0 2  fontforge/glyphcomp.c
  21. +0 6 fontforge/libstamp.pre
  22. +0 2  fontforge/math.c
  23. +0 17 fontforge/nonlineartrans.c
  24. +0 6 fontforge/parsepdf.c
  25. +0 11 fontforge/print.c
  26. +0 2  fontforge/print.h
  27. +0 24 fontforge/psread.c
  28. +0 4 fontforge/savefont.c
  29. +0 2  fontforge/search.c
  30. +8 37 fontforge/sfd.c
  31. +0 4 fontforge/splinechar.c
  32. +1 8 fontforge/splinefill.c
  33. +0 8 fontforge/splinefont.h
  34. +0 2  fontforge/splinesave.c
  35. +0 67 fontforge/splineutil.c
  36. +0 2  fontforge/startnoui.c
  37. +0 4 fontforge/startui.c
  38. +0 12 fontforge/svg.c
  39. +0 3  fontforge/views.h
  40. +0 15 gtkui/startgtk.c
  41. +2 2 htdocs/charview.html
  42. +2 3 htdocs/filemenu.html
  43. +2 3 htdocs/fontinfo.html
  44. +1 8 htdocs/glossary.html
  45. +3 14 htdocs/multilayer.html
  46. +2 3 htdocs/overview.html
  47. +0 3  htdocs/sfdformat.html
  48. +0 11 htdocs/source-build.html
  49. +0 1  inc/config.h.in
  50. +0 1  inc/config.h_vms
11 README-MS.html
@@ -362,17 +362,6 @@ <H1 ALIGN=Center>
362 362 </PRE>
363 363 </BLOCKQUOTE>
364 364 <H4>
365   - Building fontforge to edit type3 fonts
366   -</H4>
367   -<P>
368   -If you do want to edit PostScript type3 fonts, you can configure fontforge
369   -to give you access to more drawing modes than are generally available in
370   -fonts.
371   -<BLOCKQUOTE>
372   - <PRE><FONT COLOR="Gray">$ </FONT>configure --enable-type3
373   -</PRE>
374   -</BLOCKQUOTE>
375   -<H4>
376 365 Installing FontForge somewhere other than <CODE>/usr/local</CODE>
377 366 </H4>
378 367 <P>
13 README-Mac.html
@@ -393,19 +393,6 @@ <H1 ALIGN=Center>
393 393 </PRE>
394 394 </BLOCKQUOTE>
395 395 <H4>
396   - Building fontforge to edit type3 fonts
397   -</H4>
398   -<P>
399   -If you do want to edit PostScript type3 fonts, you can configure fontforge
400   -to give you access to more drawing modes than are generally available in
401   -fonts.
402   -<P>
403   -(This also lets you create more complex SVG fonts).
404   -<BLOCKQUOTE>
405   - <PRE><FONT COLOR="Gray">$ </FONT>configure --enable-type3
406   -</PRE>
407   -</BLOCKQUOTE>
408   -<H4>
409 396 Installing FontForge somewhere other than <CODE>/usr/local</CODE>
410 397 </H4>
411 398 <P>
11 README-Unix.html
@@ -286,17 +286,6 @@ <H1 ALIGN=Center>
286 286 </PRE>
287 287 </BLOCKQUOTE>
288 288 <H4>
289   - Building fontforge to edit type3 fonts
290   -</H4>
291   -<P>
292   -If you do want to edit PostScript type3 fonts, you can configure fontforge
293   -to give you access to more drawing modes than are generally available in
294   -fonts.
295   -<BLOCKQUOTE>
296   - <PRE><FONT COLOR="Gray">$ </FONT>configure --enable-type3
297   -</PRE>
298   -</BLOCKQUOTE>
299   -<H4>
300 289 Installing FontForge somewhere other than <CODE>/usr/local</CODE>
301 290 </H4>
302 291 <P>
22 fontforge/charinfo.c
@@ -1254,10 +1254,8 @@ static SplineChar *CI_SCDuplicate(SplineChar *sc) {
1254 1254 newsc->possub = CI_PSTCopy(sc->possub);
1255 1255 newsc->kerns = CI_KPCopy(sc->kerns);
1256 1256 newsc->vkerns = CI_KPCopy(sc->vkerns);
1257   -#ifdef FONTFORGE_CONFIG_TYPE3
1258 1257 newsc->tile_margin = sc->tile_margin;
1259 1258 newsc->tile_bounds = sc->tile_bounds;
1260   -#endif
1261 1259 return( newsc );
1262 1260 }
1263 1261
@@ -1379,10 +1377,8 @@ static int _CI_OK(CharInfo *ci) {
1379 1377 char *italicdevtab=NULL, *accentdevtab=NULL, *hicdt=NULL, *vicdt=NULL;
1380 1378 int lig_caret_cnt_fixed=0;
1381 1379 int low,high;
1382   -#ifdef FONTFORGE_CONFIG_TYPE3
1383 1380 real tile_margin=0;
1384 1381 DBounds tileb;
1385   -#endif
1386 1382 SplineChar *oldsc = ci->cachedsc==NULL ? ci->sc : ci->cachedsc;
1387 1383
1388 1384 if ( !CI_ValidateAltUnis(ci))
@@ -1402,7 +1398,6 @@ return( false );
1402 1398 if ( err )
1403 1399 return( false );
1404 1400
1405   -#ifdef FONTFORGE_CONFIG_TYPE3
1406 1401 memset(&tileb,0,sizeof(tileb));
1407 1402 if ( ci->sc->parent->multilayer ) {
1408 1403 if ( GGadgetIsChecked(GWidgetGetControl(ci->gw,CID_IsTileMargin)))
@@ -1416,7 +1411,6 @@ return( false );
1416 1411 if ( err )
1417 1412 return( false );
1418 1413 }
1419   -#endif
1420 1414
1421 1415 lig_caret_cnt_fixed = !GGadgetIsChecked(GWidgetGetControl(ci->gw,CID_DefLCCount));
1422 1416 if ( ci->lc_seen ) {
@@ -1527,10 +1521,8 @@ return( false );
1527 1521 }
1528 1522 }
1529 1523
1530   -#ifdef FONTFORGE_CONFIG_TYPE3
1531 1524 ci->cachedsc->tile_margin = tile_margin;
1532 1525 ci->cachedsc->tile_bounds = tileb;
1533   -#endif
1534 1526
1535 1527 return( ret );
1536 1528 }
@@ -1611,10 +1603,8 @@ static void CI_ApplyAll(CharInfo *ci) {
1611 1603 KernPairsFree(sc->kerns); KernPairsFree(sc->vkerns);
1612 1604 sc->kerns = cached->kerns; sc->vkerns = cached->vkerns;
1613 1605 cached->kerns = cached->vkerns = NULL;
1614   -#ifdef FONTFORGE_CONFIG_TYPE3
1615 1606 sc->tile_margin = cached->tile_margin;
1616 1607 sc->tile_bounds = cached->tile_bounds;
1617   -#endif
1618 1608 if ( !sc->changed ) {
1619 1609 sc->changed = true;
1620 1610 refresh_fvdi = true;
@@ -1665,7 +1655,6 @@ static int CI_OK(GGadget *g, GEvent *e) {
1665 1655 return( true );
1666 1656 }
1667 1657
1668   -#ifdef FONTFORGE_CONFIG_TYPE3
1669 1658 static void CI_BoundsToMargin(CharInfo *ci) {
1670 1659 int err=false;
1671 1660 real margin = GetCalmReal8(ci->gw,CID_TileMargin,NULL,&err);
@@ -1695,7 +1684,6 @@ static int CI_TileMarginChange(GGadget *g, GEvent *e) {
1695 1684 CI_BoundsToMargin(ci);
1696 1685 return( true );
1697 1686 }
1698   -#endif
1699 1687
1700 1688 static char *LigDefaultStr(int uni, char *name, int alt_lig ) {
1701 1689 const unichar_t *alt=NULL, *pt;
@@ -4036,7 +4024,6 @@ static void CIFillup(CharInfo *ci) {
4036 4024 }
4037 4025 GA_ToMD(GWidgetGetControl(ci->gw,CID_AltUni), sc);
4038 4026
4039   -#ifdef FONTFORGE_CONFIG_TYPE3
4040 4027 if ( ci->sc->parent->multilayer ) {
4041 4028 int margined = sc->tile_margin!=0 || (sc->tile_bounds.minx==0 && sc->tile_bounds.maxx==0);
4042 4029 char buffer[40];
@@ -4058,7 +4045,6 @@ static void CIFillup(CharInfo *ci) {
4058 4045 GGadgetSetTitle8(GWidgetGetControl(ci->gw,CID_TileBBoxMaxY),buffer);
4059 4046 }
4060 4047 }
4061   -#endif
4062 4048
4063 4049 GGadgetSetChecked(GWidgetGetControl(ci->gw,CID_DefLCCount), !sc->lig_caret_cnt_fixed );
4064 4050 GGadgetSetEnabled(GWidgetGetControl(ci->gw,CID_LCCountLab), sc->lig_caret_cnt_fixed );
@@ -4154,11 +4140,9 @@ void SCCharInfo(SplineChar *sc,int deflayer, EncMap *map,int enc) {
4154 4140 GGadgetCreateData tbox[3], *thvarray[36], *tbarray[4];
4155 4141 GGadgetCreateData lcbox[2], *lchvarray[4][4];
4156 4142 GGadgetCreateData varbox[2][2], *varhvarray[2][5][4];
4157   -#ifdef FONTFORGE_CONFIG_TYPE3
4158 4143 GGadgetCreateData tilegcd[16], tilebox[4];
4159 4144 GTextInfo tilelabel[16];
4160 4145 GGadgetCreateData *tlvarray[6], *tlharray[4], *tlhvarray[4][5];
4161   -#endif
4162 4146 int i;
4163 4147 GTabInfo aspects[17];
4164 4148 static GBox smallbox = { bt_raised, bs_rect, 2, 1, 0, 0, 0, 0, 0, 0, COLOR_DEFAULT, COLOR_DEFAULT, 0, 0, 0, 0, 0, 0, 0 };
@@ -4772,7 +4756,6 @@ return;
4772 4756 varbox[i][0].creator = GHVBoxCreate;
4773 4757 }
4774 4758
4775   -#ifdef FONTFORGE_CONFIG_TYPE3
4776 4759 memset(&tilegcd,0,sizeof(tilegcd));
4777 4760 memset(&tilebox,0,sizeof(tilebox));
4778 4761 memset(&tilelabel,0,sizeof(tilelabel));
@@ -4881,7 +4864,6 @@ return;
4881 4864 tilebox[0].gd.flags = gg_enabled|gg_visible;
4882 4865 tilebox[0].gd.u.boxelements = tlvarray;
4883 4866 tilebox[0].creator = GVBoxCreate;
4884   -#endif
4885 4867
4886 4868 memset(&mgcd,0,sizeof(mgcd));
4887 4869 memset(&mbox,0,sizeof(mbox));
@@ -4954,13 +4936,11 @@ return;
4954 4936 aspects[i].nesting = 1;
4955 4937 aspects[i++].gcd = varbox[1];
4956 4938
4957   -#ifdef FONTFORGE_CONFIG_TYPE3
4958 4939 if ( sc->parent->multilayer ) {
4959 4940 aspects[i].text = (unichar_t *) U_("Tile Size");
4960 4941 aspects[i].text_is_1byte = true;
4961 4942 aspects[i++].gcd = tilebox;
4962 4943 }
4963   -#endif
4964 4944
4965 4945 if ( last_gi_aspect<i )
4966 4946 aspects[last_gi_aspect].selected = true;
@@ -5078,13 +5058,11 @@ return;
5078 5058 GHVBoxSetExpandableRow(varbox[0][0].ret,3);
5079 5059 GHVBoxSetExpandableRow(varbox[1][0].ret,3);
5080 5060
5081   -#ifdef FONTFORGE_CONFIG_TYPE3
5082 5061 if ( sc->parent->multilayer ) {
5083 5062 GHVBoxSetExpandableRow(tilebox[0].ret,gb_expandglue);
5084 5063 GHVBoxSetExpandableCol(tilebox[2].ret,gb_expandglue);
5085 5064 GHVBoxSetExpandableCol(tilebox[3].ret,gb_expandglue);
5086 5065 }
5087   -#endif
5088 5066
5089 5067 GHVBoxFitWindow(mbox[0].ret);
5090 5068
15 fontforge/charview.c
@@ -1267,7 +1267,6 @@ void CVDrawSplineSetSpecialized(CharView *cv, GWindow pixmap, SplinePointList *s
1267 1267
1268 1268 static void CVDrawLayerSplineSet(CharView *cv, GWindow pixmap, Layer *layer,
1269 1269 Color fg, int dopoints, DRect *clip, enum outlinesfm_flags strokeFillMode ) {
1270   -#ifdef FONTFORGE_CONFIG_TYPE3
1271 1270 int active = cv->b.layerheads[cv->b.drawmode]==layer;
1272 1271 int ml = cv->b.sc->parent->multilayer;
1273 1272
@@ -1298,9 +1297,6 @@ static void CVDrawLayerSplineSet(CharView *cv, GWindow pixmap, Layer *layer,
1298 1297 if ( layer->dostroke && layer->stroke_pen.width!=WIDTH_INHERITED )
1299 1298 GDrawSetLineWidth(pixmap,0);
1300 1299 #endif
1301   -#else
1302   - CVDrawSplineSetSpecialized(cv,pixmap,layer->splines,fg,dopoints,clip,strokeFillMode);
1303   -#endif
1304 1300 }
1305 1301
1306 1302 static void CVDrawTemplates(CharView *cv,GWindow pixmap,SplineChar *template,DRect *clip) {
@@ -4081,9 +4077,7 @@ static void _SC_CharChangedUpdate(SplineChar *sc,int layer,int changed) {
4081 4077 if ( updateflex && (CharView *) (sc->views)!=NULL && layer>=ly_fore )
4082 4078 SplineCharIsFlexible(sc,layer);
4083 4079 SCUpdateAll(sc);
4084   -# ifdef FONTFORGE_CONFIG_TYPE3
4085 4080 SCLayersChange(sc);
4086   -# endif
4087 4081 SCRegenFills(sc);
4088 4082 }
4089 4083
@@ -4097,9 +4091,7 @@ static void _CV_CharChangedUpdate(CharView *cv,int changed) {
4097 4091 int cvlayer = CVLayer((CharViewBase *) cv);
4098 4092
4099 4093 CVSetCharChanged(cv,changed);
4100   -#ifdef FONTFORGE_CONFIG_TYPE3
4101 4094 CVLayerChange(cv);
4102   -#endif
4103 4095 if ( cv->needsrasterize ) {
4104 4096 TTFPointMatches(cv->b.sc,cvlayer,true); /* Must precede regen dependents, as this can change references */
4105 4097 SCRegenDependents(cv->b.sc,cvlayer); /* All chars linked to this one need to get the new splines */
@@ -8529,12 +8521,10 @@ void CVMakeClipPath(CharView *cv) {
8529 8521 CVCharChangedUpdate((CharViewBase *) cv);
8530 8522 }
8531 8523
8532   -#ifdef FONTFORGE_CONFIG_TYPE3
8533 8524 static void CVMenuClipPath(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
8534 8525 CharView *cv = (CharView *) GDrawGetUserData(gw);
8535 8526 CVMakeClipPath(cv);
8536 8527 }
8537   -#endif
8538 8528
8539 8529 void CVAddAnchor(CharView *cv) {
8540 8530 int waslig;
@@ -9762,9 +9752,7 @@ static GMenuItem2 ptlist[] = {
9762 9752 { { (unichar_t *) N_("Ma_ke Arc"), (GImage *) "pointsmakearc.png", COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 0, 1, 1, 0, 'M' }, H_("Make Arc|No Shortcut"), NULL, NULL, CVMenuMakeLine, MID_MakeArc },
9763 9753 { { (unichar_t *) N_("Inse_rt Point On Spline At..."), (GImage *) "menuempty.png", COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 0, 1, 1, 0, 'M' }, H_("Insert Point On Spline At...|No Shortcut"), NULL, NULL, CVMenuInsertPt, MID_InsertPtOnSplineAt },
9764 9754 { { (unichar_t *) N_("_Name Contour"), (GImage *) "pointsnamecontour.png", COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 0, 1, 1, 0, 'M' }, H_("Name Contour|No Shortcut"), NULL, NULL, CVMenuNameContour, MID_NameContour },
9765   -#ifdef FONTFORGE_CONFIG_TYPE3
9766 9755 { { (unichar_t *) N_("Make Clip _Path"), (GImage *) "menuempty.png", COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 0, 1, 1, 0, 'M' }, H_("Make Clip Path|No Shortcut"), NULL, NULL, CVMenuClipPath, MID_ClipPath },
9767   -#endif
9768 9756 { { NULL, NULL, COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 1, 0, 0, 0, '\0' }, NULL, NULL, NULL, NULL, 0 }, /* line */
9769 9757 { { (unichar_t *) N_("Tool_s"), (GImage *) "menuempty.png", COLOR_DEFAULT, COLOR_DEFAULT, NULL, NULL, 0, 1, 0, 0, 0, 0, 1, 1, 0, 'M' }, NULL, cvtoollist, cvtoollist_check, NULL, MID_Tools },
9770 9758 GMENUITEM2_EMPTY
@@ -10918,8 +10906,6 @@ void PTDCharViewInits(TilePathDlg *tpd, int cid) {
10918 10906 }
10919 10907 #endif /* TilePath */
10920 10908
10921   -#ifdef FONTFORGE_CONFIG_TYPE3 /* And gradients */
10922   -
10923 10909 void GDDCharViewInits(GradientDlg *gdd, int cid) {
10924 10910 GGadgetData gd;
10925 10911 GWindowAttrs wattrs;
@@ -10947,7 +10933,6 @@ void GDDCharViewInits(GradientDlg *gdd, int cid) {
10947 10933 &pos,nested_cv_e_h,&gdd->cv_grad,&wattrs);
10948 10934 _CharViewCreate(&gdd->cv_grad, &gdd->sc_grad, &gdd->dummy_fv, 0);
10949 10935 }
10950   -#endif /* Gradients (TYPE3) */
10951 10936
10952 10937 void StrokeCharViewInits(StrokeDlg *sd, int cid) {
10953 10938 GGadgetData gd;
12 fontforge/configure-fontforge.h
@@ -28,18 +28,6 @@
28 28 #define _CONFIG_FONTFORGE_H_
29 29
30 30
31   -/* Making FontForge handle more of the capabilities of type3 & svg fonts is not*/
32   -/* something most people will want. It wastes space too. So I thought I'd */
33   -/* make it conditional. */
34   -/* */
35   -/* #define FONTFORGE_CONFIG_TYPE3 */
36   -/* */
37   -/* It allows people to have images in a font, multiple layers, strokes, fills */
38   -/* transparencies, etc. (type3 doesn't support transparency, svg doesn't do */
39   -/* images) */
40   -/* Can be set from configure --with-multilayer */
41   -
42   -
43 31 /* Apple suggests using a sfnt version of 'true' for fonts designed for use */
44 32 /* only on a mac (windows refuses such fonts). I generally prefer to have a */
45 33 /* font work everywhere, so normally ff produces fonts with version 1.0 */
9 fontforge/cvexport.c
@@ -95,7 +95,6 @@ int _ExportEPS(FILE *eps,SplineChar *sc, int layer, int preview) {
95 95 tm = localtime(&now);
96 96 fprintf( eps, "%%%%CreationDate: %d:%02d %d-%d-%d\n", tm->tm_hour, tm->tm_min,
97 97 tm->tm_mday, tm->tm_mon+1, 1900+tm->tm_year );
98   -#ifdef FONTFORGE_CONFIG_TYPE3
99 98 if ( sc->parent->multilayer ) {
100 99 int ly, had_grad=0, had_pat=0;
101 100 for ( ly=ly_fore; ly<sc->layer_cnt; ++ly ) {
@@ -111,7 +110,6 @@ int _ExportEPS(FILE *eps,SplineChar *sc, int layer, int preview) {
111 110 else if ( had_pat )
112 111 fprintf( eps, "%%%%LanguageLevel: 2\n" );
113 112 }
114   -#endif
115 113 fprintf( eps, "%%%%EndComments\n" );
116 114 if ( preview )
117 115 EpsGeneratePreview(eps,sc,layer,&b);
@@ -120,11 +118,9 @@ int _ExportEPS(FILE *eps,SplineChar *sc, int layer, int preview) {
120 118
121 119 fprintf( eps, "gsave newpath\n" );
122 120 SC_PSDump((void (*)(int,void *)) fputc,eps,sc,true,false,layer);
123   -#ifdef FONTFORGE_CONFIG_TYPE3
124 121 if ( sc->parent->multilayer )
125 122 fprintf( eps, "grestore\n" );
126 123 else
127   -#endif
128 124 if ( sc->parent->strokedfont )
129 125 fprintf( eps, "%g setlinewidth stroke grestore\n", (double) sc->parent->strokewidth );
130 126 else
@@ -193,12 +189,9 @@ int _ExportPDF(FILE *pdf,SplineChar *sc,int layer) {
193 189 fprintf( pdf, " stream \n" );
194 190 streamstart = ftell(pdf);
195 191 SC_PSDump((void (*)(int,void *)) fputc,pdf,sc,true,true,layer);
196   -#ifdef FONTFORGE_CONFIG_TYPE3
197 192 if ( sc->parent->multilayer )
198 193 /* Already filled or stroked */;
199   - else
200   -#endif
201   - if ( sc->parent->strokedfont )
  194 + else if ( sc->parent->strokedfont )
202 195 fprintf( pdf, "%g w S\n", (double) sc->parent->strokewidth );
203 196 else
204 197 fprintf( pdf, "f\n" );
25 fontforge/cvimages.c
@@ -32,7 +32,6 @@
32 32 #include <ustring.h>
33 33 #include <utype.h>
34 34
35   -#ifdef FONTFORGE_CONFIG_TYPE3
36 35 void SCAppendEntityLayers(SplineChar *sc, Entity *ent) {
37 36 int cnt, pos;
38 37 Entity *e, *enext;
@@ -99,7 +98,6 @@ return;
99 98 sc->layer_cnt += cnt;
100 99 SCMoreLayers(sc,old);
101 100 }
102   -#endif
103 101
104 102 void SCImportPSFile(SplineChar *sc,int layer,FILE *ps,int doclear,int flags) {
105 103 SplinePointList *spl, *espl;
@@ -110,12 +108,9 @@ void SCImportPSFile(SplineChar *sc,int layer,FILE *ps,int doclear,int flags) {
110 108 return;
111 109 width = UNDEFINED_WIDTH;
112 110 empty = sc->layers[layer].splines==NULL && sc->layers[layer].refs==NULL;
113   -#ifdef FONTFORGE_CONFIG_TYPE3
114 111 if ( sc->parent->multilayer && layer>ly_back ) {
115 112 SCAppendEntityLayers(sc, EntityInterpretPS(ps,&width));
116   - } else
117   -#endif
118   - {
  113 + } else {
119 114 spl = SplinePointListInterpretPS(ps,flags,sc->parent->strokedfont,&width);
120 115 if ( spl==NULL ) {
121 116 ff_post_error( _("Too Complex or Bad"), _("I'm sorry this file is too complex for me to understand (or is erroneous, or is empty)") );
@@ -161,12 +156,9 @@ return;
161 156
162 157 width = UNDEFINED_WIDTH;
163 158 empty = sc->layers[layer].splines==NULL && sc->layers[layer].refs==NULL;
164   -#ifdef FONTFORGE_CONFIG_TYPE3
165 159 if ( sc->parent->multilayer && layer>ly_back ) {
166 160 SCAppendEntityLayers(sc, EntityInterpretPDFPage(pdf,-1));
167   - } else
168   -#endif
169   - {
  161 + } else {
170 162 spl = SplinesFromEntities(EntityInterpretPDFPage(pdf,-1),&flags,sc->parent->strokedfont);
171 163 if ( spl==NULL ) {
172 164 ff_post_error( _("Too Complex or Bad"), _("I'm sorry this file is too complex for me to understand (or is erroneous, or is empty)") );
@@ -308,13 +300,10 @@ return;
308 300 void SCImportSVG(SplineChar *sc,int layer,char *path,char *memory, int memlen, int doclear) {
309 301 SplinePointList *spl, *espl, **head;
310 302
311   -#ifdef FONTFORGE_CONFIG_TYPE3
312 303 if ( sc->parent->multilayer && layer>ly_back ) {
313 304 SCAppendEntityLayers(sc, EntityInterpretSVG(path,memory,memlen,sc->parent->ascent+sc->parent->descent,
314 305 sc->parent->ascent));
315   - } else
316   -#endif
317   - {
  306 + } else {
318 307 spl = SplinePointListInterpretSVG(path,memory,memlen,sc->parent->ascent+sc->parent->descent,
319 308 sc->parent->ascent,sc->parent->strokedfont);
320 309 for ( espl = spl; espl!=NULL && espl->first->next==NULL; espl=espl->next );
@@ -978,11 +967,7 @@ int FVImportImages(FontViewBase *fv,char *path,int format,int toback, int flags)
978 967 return(false);
979 968 }
980 969 ++tot;
981   -#ifdef FONTFORGE_CONFIG_TYPE3
982 970 SCAddScaleImage(sc,image,true,toback?ly_back:ly_fore);
983   -#else
984   - SCAddScaleImage(sc,image,true,toback || !fv->sf->layers[fv->active_layer].background ? ly_back : fv->active_layer );
985   -#endif
986 971 #ifndef _NO_LIBXML
987 972 } else if ( format==fv_svg ) {
988 973 SCImportSVG(sc,toback?ly_back:fv->active_layer,start,NULL,0,flags&sf_clearbeforeinput);
@@ -1095,11 +1080,7 @@ return( false );
1095 1080 continue;
1096 1081 }
1097 1082 ++tot;
1098   -#ifdef FONTFORGE_CONFIG_TYPE3
1099 1083 SCAddScaleImage(sc,image,true,toback?ly_back:ly_fore);
1100   -#else
1101   - SCAddScaleImage(sc,image,true,ly_back);
1102   -#endif
1103 1084 #ifndef _NO_LIBXML
1104 1085 } else if ( format==fv_svgtemplate ) {
1105 1086 SCImportSVG(sc,toback?ly_back:fv->active_layer,start,NULL,0,flags&sf_clearbeforeinput);
11 fontforge/cvimportdlg.c
@@ -580,11 +580,7 @@ static int GFD_Format(GGadget *g, GEvent *e) {
580 580 GGadgetSetEnabled(d->background,true);
581 581 } else { /* Images */
582 582 GGadgetSetChecked(d->background,true);
583   -#ifdef FONTFORGE_CONFIG_TYPE3
584 583 GGadgetSetEnabled(d->background,true);
585   -#else
586   - GGadgetSetEnabled(d->background,false);
587   -#endif
588 584 }
589 585 }
590 586 }
@@ -749,15 +745,8 @@ static void _Import(CharView *cv,BitmapView *bv,FontView *fv) {
749 745 if ( fv!=NULL ) {
750 746 gcd[6].gd.pos.x = 185; gcd[6].gd.pos.y = gcd[5].gd.pos.y+4;
751 747 gcd[6].gd.flags = gg_visible | gg_enabled ;
752   -#ifdef FONTFORGE_CONFIG_TYPE3
753 748 if ( format==fv_pk || format==fv_image || format==fv_imgtemplate )
754 749 gcd[6].gd.flags = gg_visible | gg_enabled | gg_cb_on;
755   -#else
756   - if ( format==fv_pk )
757   - gcd[6].gd.flags = gg_visible | gg_enabled | gg_cb_on;
758   - else if ( format==fv_image || format==fv_imgtemplate )
759   - gcd[6].gd.flags = gg_visible | gg_cb_on;
760   -#endif
761 750 label[6].text = (unichar_t *) _("As Background");
762 751 label[6].text_is_1byte = true;
763 752 gcd[6].gd.label = &label[6];
66 fontforge/cvpalettes.c
@@ -76,10 +76,8 @@ struct l2 {
76 76 2, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, NULL, NULL
77 77 };
78 78
79   -#ifdef FONTFORGE_CONFIG_TYPE3
80 79 struct l2 layer2 = { 2, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, NULL, NULL };
81 80 static int layers2_active = -1;
82   -#endif
83 81 static GPoint cvtoolsoff = { -9999, -9999 }, cvlayersoff = { -9999, -9999 }, bvlayersoff = { -9999, -9999 }, bvtoolsoff = { -9999, -9999 }, bvshadesoff = { -9999, -9999 };
84 82 int palettes_fixed=1;
85 83 static GCursor tools[cvt_max+1] = { ct_pointer }, spirotools[cvt_max+1];
@@ -1298,8 +1296,6 @@ static BDFChar *BDFCharFromLayer(SplineChar *sc,int layer) {
1298 1296 return( SplineCharAntiAlias(&dummy,ly_fore,24,4));
1299 1297 }
1300 1298
1301   -#ifdef FONTFORGE_CONFIG_TYPE3
1302   -
1303 1299 /* Update the type3 layers palette to the given character view */
1304 1300 static void CVLayers2Set(CharView *cv) {
1305 1301 int i, top;
@@ -1779,10 +1775,6 @@ return;
1779 1775 layer2.layers[layer+1] = BDFCharFromLayer(cv->b.sc,layer);
1780 1776 GDrawRequestExpose(cvlayers2,NULL,false);
1781 1777 }
1782   -#else
1783   -void SC_MoreLayers(SplineChar *sc, Layer *old) {
1784   -}
1785   -#endif /* FONTFORGE_CONFIG_TYPE3 */
1786 1778
1787 1779 /* Update the state of the controls of the non-type3 layers palette to the given character view */
1788 1780 /* New widgets are not allocated here. For that, see CVLCheckLayerCount(). */
@@ -1840,12 +1832,10 @@ static void CVLayers1Set(CharView *cv) {
1840 1832 * are created or hid here, only the state of existing gadgets is changed.
1841 1833 * New layer gadgets are created in CVLCheckLayerCount(). */
1842 1834 void CVLayersSet(CharView *cv) {
1843   -#ifdef FONTFORGE_CONFIG_TYPE3
1844 1835 if ( cv->b.sc->parent->multilayer ) {
1845 1836 CVLayers2Set(cv);
1846 1837 return;
1847 1838 }
1848   -#endif
1849 1839 /* This is for the non-type3 layers palette: */
1850 1840 CVLayers1Set(cv);
1851 1841 }
@@ -1876,9 +1866,7 @@ return;
1876 1866 memset(&base,0,sizeof(base));
1877 1867 gi.u.image = &base;
1878 1868 base.image_type = it_index;
1879   -#ifdef FONTFORGE_CONFIG_TYPE3
1880 1869 base.clut = layer2.clut;
1881   -#endif
1882 1870 base.trans = -1;
1883 1871 GDrawSetFont(pixmap,layerinfo.font);
1884 1872
@@ -2747,13 +2735,9 @@ return( false );
2747 2735 g = GWidgetGetControl(cvlayers, CID_EBase+off-1);
2748 2736 if ( off-1<parent->layer_cnt && off!=curlayer ) {
2749 2737 CVLSelectLayer(cv, off);
2750   - #ifdef FONTFORGE_CONFIG_TYPE3
2751 2738 if ( cv->b.sc->parent->multilayer )
2752 2739 GDrawRequestExpose(cvlayers2,NULL,false);
2753 2740 else
2754   - #else
2755   - GDrawRequestExpose(cvlayers,NULL,false);
2756   - #endif
2757 2741 return( true );
2758 2742 }
2759 2743 }
@@ -2773,7 +2757,6 @@ return( true );
2773 2757 if ( islower(mn)) mnc = toupper(mn);
2774 2758 else if ( isupper(mn)) mnc = tolower(mn);
2775 2759 if ( event->u.chr.chars[0]==mn || event->u.chr.chars[0]==mnc ) {
2776   - #ifdef FONTFORGE_CONFIG_TYPE3
2777 2760 if ( cv->b.sc->parent->multilayer ) {
2778 2761 fake.type = et_mousedown;
2779 2762 fake.w = cvlayers;
@@ -2786,9 +2769,7 @@ return( true );
2786 2769 fake.u.mouse.y = CV_LAYERS2_HEADER_HEIGHT+12+2*CV_LAYERS2_LINE_HEIGHT;
2787 2770 }
2788 2771 cvlayers2_e_h(cvlayers2,&fake);
2789   - } else
2790   - #endif
2791   - {
  2772 + } else {
2792 2773 CVLSelectLayer(cv, i);
2793 2774 GDrawRequestExpose(cvlayers,NULL,false);
2794 2775 }
@@ -3084,16 +3065,12 @@ static void CVPaletteCheck(CharView *cv) {
3084 3065 }
3085 3066 CVMakeTools(cv);
3086 3067 }
3087   -#ifdef FONTFORGE_CONFIG_TYPE3
3088 3068 if ( cv->b.sc->parent->multilayer && cvlayers2==NULL ) {
3089 3069 if ( palettes_fixed ) {
3090 3070 cvlayersoff.x = 0; cvlayersoff.y = CV_TOOLS_HEIGHT+45/*25*/; /* 45 is right if there's decor, 25 when none. twm gives none, kde gives decor */
3091 3071 }
3092 3072 CVMakeLayers2(cv);
3093 3073 } else if ( !cv->b.sc->parent->multilayer && cvlayers==NULL ) {
3094   -#else
3095   - if ( cvlayers==NULL ) {
3096   -#endif
3097 3074 if ( palettes_fixed ) {
3098 3075 cvlayersoff.x = 0; cvlayersoff.y = CV_TOOLS_HEIGHT+45/*25*/; /* 45 is right if there's decor, 25 when none. twm gives none, kde gives decor */
3099 3076 }
@@ -3106,10 +3083,8 @@ int CVPaletteIsVisible(CharView *cv,int which) {
3106 3083 if ( which==1 )
3107 3084 return( cvtools!=NULL && GDrawIsVisible(cvtools) );
3108 3085
3109   -#ifdef FONTFORGE_CONFIG_TYPE3
3110 3086 if ( cv->b.sc->parent->multilayer )
3111 3087 return( cvlayers2!=NULL && GDrawIsVisible(cvlayers2));
3112   -#endif
3113 3088
3114 3089 return( cvlayers!=NULL && GDrawIsVisible(cvlayers) );
3115 3090 }
@@ -3118,10 +3093,8 @@ void CVPaletteSetVisible(CharView *cv,int which,int visible) {
3118 3093 CVPaletteCheck(cv);
3119 3094 if ( which==1 && cvtools!=NULL)
3120 3095 GDrawSetVisible(cvtools,visible );
3121   -#ifdef FONTFORGE_CONFIG_TYPE3
3122 3096 else if ( which==0 && cv->b.sc->parent->multilayer && cvlayers2!=NULL )
3123 3097 GDrawSetVisible(cvlayers2,visible );
3124   -#endif
3125 3098 else if ( which==0 && cvlayers!=NULL )
3126 3099 GDrawSetVisible(cvlayers,visible );
3127 3100 cvvisible[which] = visible;
@@ -3141,7 +3114,6 @@ void _CVPaletteActivate(CharView *cv,int force) {
3141 3114 CharView *old;
3142 3115
3143 3116 CVPaletteCheck(cv);
3144   -#ifdef FONTFORGE_CONFIG_TYPE3
3145 3117 if ( layers2_active!=-1 && layers2_active!=cv->b.sc->parent->multilayer ) {
3146 3118 if ( !cvvisible[0] ) {
3147 3119 if ( cvlayers2!=NULL ) GDrawSetVisible(cvlayers2,false);
@@ -3155,54 +3127,42 @@ void _CVPaletteActivate(CharView *cv,int force) {
3155 3127 }
3156 3128 }
3157 3129 layers2_active = cv->b.sc->parent->multilayer;
3158   -#endif
3159 3130 if ( (old = GDrawGetUserData(cvtools))!=cv || force) {
3160 3131 if ( old!=NULL ) {
3161 3132 SaveOffsets(old->gw,cvtools,&cvtoolsoff);
3162   -#ifdef FONTFORGE_CONFIG_TYPE3
3163 3133 if ( old->b.sc->parent->multilayer )
3164 3134 SaveOffsets(old->gw,cvlayers2,&cvlayersoff);
3165 3135 else
3166   -#endif
3167 3136 SaveOffsets(old->gw,cvlayers,&cvlayersoff);
3168 3137 }
3169 3138 GDrawSetUserData(cvtools,cv);
3170   -#ifdef FONTFORGE_CONFIG_TYPE3
3171 3139 if ( cv->b.sc->parent->multilayer ) {
3172 3140 LayersSwitch(cv);
3173 3141 GDrawSetUserData(cvlayers2,cv);
3174   - } else
3175   -#endif
3176   - {
  3142 + } else {
3177 3143 GDrawSetUserData(cvlayers,cv);
3178 3144 CVLCheckLayerCount(cv,true);
3179 3145 }
3180 3146 if ( palettes_docked ) {
3181 3147 ReparentFixup(cvtools,cv->v,0,0,CV_TOOLS_WIDTH,CV_TOOLS_HEIGHT);
3182   -#ifdef FONTFORGE_CONFIG_TYPE3
3183 3148 if ( cv->b.sc->parent->multilayer )
3184 3149 ReparentFixup(cvlayers2,cv->v,0,CV_TOOLS_HEIGHT+2,0,0);
3185 3150 else
3186   -#endif
3187 3151 ReparentFixup(cvlayers,cv->v,0,CV_TOOLS_HEIGHT+2,0,0);
3188 3152 } else {
3189 3153 if ( cvvisible[0]) {
3190   -#ifdef FONTFORGE_CONFIG_TYPE3
3191 3154 if ( cv->b.sc->parent->multilayer )
3192 3155 RestoreOffsets(cv->gw,cvlayers2,&cvlayersoff);
3193 3156 else
3194   -#endif
3195 3157 RestoreOffsets(cv->gw,cvlayers,&cvlayersoff);
3196 3158 }
3197 3159 if ( cvvisible[1])
3198 3160 RestoreOffsets(cv->gw,cvtools,&cvtoolsoff);
3199 3161 }
3200 3162 GDrawSetVisible(cvtools,cvvisible[1]);
3201   -#ifdef FONTFORGE_CONFIG_TYPE3
3202 3163 if ( cv->b.sc->parent->multilayer )
3203 3164 GDrawSetVisible(cvlayers2,cvvisible[0]);
3204 3165 else
3205   -#endif
3206 3166 GDrawSetVisible(cvlayers,cvvisible[0]);
3207 3167 if ( cvvisible[1]) {
3208 3168 cv->showing_tool = cvt_none;
@@ -3244,7 +3204,6 @@ void CV_LayerPaletteCheck(SplineFont *sf) {
3244 3204 }
3245 3205 }
3246 3206
3247   -#ifdef FONTFORGE_CONFIG_TYPE3
3248 3207 /* make the charview point to the correct layer heads for the specified glyph */
3249 3208 void SFLayerChange(SplineFont *sf) {
3250 3209 CharView *old, *cv;
@@ -3266,7 +3225,6 @@ return; /* No charviews open */
3266 3225 return;
3267 3226 _CVPaletteActivate(old,true);
3268 3227 }
3269   -#endif
3270 3228
3271 3229 void CVPalettesHideIfMine(CharView *cv) {
3272 3230 if ( cvtools==NULL )
@@ -3275,14 +3233,11 @@ return;
3275 3233 SaveOffsets(cv->gw,cvtools,&cvtoolsoff);
3276 3234 GDrawSetVisible(cvtools,false);
3277 3235 GDrawSetUserData(cvtools,NULL);
3278   -#ifdef FONTFORGE_CONFIG_TYPE3
3279 3236 if ( cv->b.sc->parent->multilayer && cvlayers2!=NULL ) {
3280 3237 SaveOffsets(cv->gw,cvlayers2,&cvlayersoff);
3281 3238 GDrawSetVisible(cvlayers2,false);
3282 3239 GDrawSetUserData(cvlayers2,NULL);
3283   - } else
3284   -#endif
3285   - {
  3240 + } else {
3286 3241 SaveOffsets(cv->gw,cvlayers,&cvlayersoff);
3287 3242 GDrawSetVisible(cvlayers,false);
3288 3243 GDrawSetUserData(cvlayers,NULL);
@@ -3291,11 +3246,7 @@ return;
3291 3246 }
3292 3247
3293 3248 int CVPalettesWidth(void) {
3294   -#ifdef FONTFORGE_CONFIG_TYPE3
3295 3249 return( GGadgetScale(CV_LAYERS2_WIDTH));
3296   -#else
3297   -return( GGadgetScale(CV_LAYERS_WIDTH));
3298   -#endif
3299 3250 }
3300 3251
3301 3252 /* ************************************************************************** */
@@ -4026,13 +3977,10 @@ void CVPaletteDeactivate(void) {
4026 3977 if ( cv!=NULL ) {
4027 3978 SaveOffsets(cv->gw,cvtools,&cvtoolsoff);
4028 3979 GDrawSetUserData(cvtools,NULL);
4029   -#ifdef FONTFORGE_CONFIG_TYPE3
4030 3980 if ( cv->b.sc->parent->multilayer && cvlayers2!=NULL ) {
4031 3981 SaveOffsets(cv->gw,cvlayers2,&cvlayersoff);
4032 3982 GDrawSetUserData(cvlayers2,NULL);
4033   - } else
4034   -#endif
4035   - if ( cvlayers!=NULL ) {
  3983 + } else if ( cvlayers!=NULL ) {
4036 3984 SaveOffsets(cv->gw,cvlayers,&cvlayersoff);
4037 3985 GDrawSetUserData(cvlayers,NULL);
4038 3986 }
@@ -4040,10 +3988,8 @@ void CVPaletteDeactivate(void) {
4040 3988 GDrawSetVisible(cvtools,false);
4041 3989 if ( cvlayers!=NULL )
4042 3990 GDrawSetVisible(cvlayers,false);
4043   -#ifdef FONTFORGE_CONFIG_TYPE3
4044 3991 if ( cvlayers2!=NULL )
4045 3992 GDrawSetVisible(cvlayers2,false);
4046   -#endif
4047 3993 }
4048 3994 if ( bvtools!=NULL ) {
4049 3995 BitmapView *bv = GDrawGetUserData(bvtools);
@@ -4096,10 +4042,8 @@ void PalettesChangeDocking(void) {
4096 4042 ReparentFixup(cvtools,cv->v,0,0,CV_TOOLS_WIDTH,CV_TOOLS_HEIGHT);
4097 4043 if ( cvlayers!=NULL )
4098 4044 ReparentFixup(cvlayers,cv->v,0,CV_TOOLS_HEIGHT+2,0,0);
4099   -#ifdef FONTFORGE_CONFIG_TYPE3
4100 4045 if ( cvlayers2!=NULL )
4101 4046 ReparentFixup(cvlayers2,cv->v,0,CV_TOOLS_HEIGHT+2,0,0);
4102   -#endif
4103 4047 }
4104 4048 }
4105 4049 if ( bvtools!=NULL ) {
@@ -4115,10 +4059,8 @@ void PalettesChangeDocking(void) {
4115 4059 GDrawReparentWindow(cvtools,GDrawGetRoot(NULL),0,0);
4116 4060 if ( cvlayers!=NULL )
4117 4061 GDrawReparentWindow(cvlayers,GDrawGetRoot(NULL),0,CV_TOOLS_HEIGHT+2+45);
4118   -#ifdef FONTFORGE_CONFIG_TYPE3
4119 4062 if ( cvlayers2!=NULL )
4120 4063 GDrawReparentWindow(cvlayers2,GDrawGetRoot(NULL),0,CV_TOOLS_HEIGHT+2+45);
4121   -#endif
4122 4064 }
4123 4065 if ( bvtools!=NULL ) {
4124 4066 GDrawReparentWindow(bvtools,GDrawGetRoot(NULL),0,0);
3  fontforge/cvstroke.c
@@ -1204,8 +1204,6 @@ void FreeHandStrokeDlg(StrokeInfo *si) {
1204 1204 /* ************************************************************************** */
1205 1205 /* ****************************** Layer Dialog ****************************** */
1206 1206 /* ************************************************************************** */
1207   -#ifdef FONTFORGE_CONFIG_TYPE3
1208   -
1209 1207 #define LY_Width 300
1210 1208 #define LY_Height 336
1211 1209
@@ -3364,4 +3362,3 @@ int LayerDialog(Layer *layer,SplineFont *sf) {
3364 3362 }
3365 3363 return( ld.ok );
3366 3364 }
3367   -#endif /* TYPE3 */
51 fontforge/cvundoes.c
@@ -482,12 +482,10 @@ void UndoesFree(Undoes *undo) {
482 482 PSTFree( undo->u.state.possub );
483 483 }
484 484 AnchorPointsFree(undo->u.state.anchor);
485   -#ifdef FONTFORGE_CONFIG_TYPE3
486 485 GradientFree(undo->u.state.fill_brush.gradient);
487 486 PatternFree(undo->u.state.fill_brush.pattern);
488 487 GradientFree(undo->u.state.stroke_pen.brush.gradient);
489 488 PatternFree(undo->u.state.stroke_pen.brush.pattern);
490   -#endif
491 489 break;
492 490 case ut_bitmap:
493 491 for ( head=undo->u.bmpstate.refs; head != NULL; ) {
@@ -572,13 +570,11 @@ return(NULL);
572 570 undo->u.state.anchor = AnchorPointsCopy(cv->sc->anchor);
573 571 }
574 572 undo->u.state.images = ImageListCopy(cv->layerheads[cv->drawmode]->images);
575   -#ifdef FONTFORGE_CONFIG_TYPE3
576 573 BrushCopy(&undo->u.state.fill_brush,&cv->layerheads[cv->drawmode]->fill_brush,NULL);
577 574 PenCopy(&undo->u.state.stroke_pen,&cv->layerheads[cv->drawmode]->stroke_pen,NULL);
578 575 undo->u.state.dofill = cv->layerheads[cv->drawmode]->dofill;
579 576 undo->u.state.dostroke = cv->layerheads[cv->drawmode]->dostroke;
580 577 undo->u.state.fillfirst = cv->layerheads[cv->drawmode]->fillfirst;
581   -#endif
582 578 return( CVAddUndo(cv,undo));
583 579 }
584 580
@@ -648,13 +644,11 @@ return(NULL);
648 644 }
649 645 }
650 646 undo->u.state.images = ImageListCopy(sc->layers[layer].images);
651   -#ifdef FONTFORGE_CONFIG_TYPE3
652 647 BrushCopy(&undo->u.state.fill_brush,&sc->layers[layer].fill_brush,NULL);
653 648 PenCopy(&undo->u.state.stroke_pen,&sc->layers[layer].stroke_pen,NULL);
654 649 undo->u.state.dofill = sc->layers[layer].dofill;
655 650 undo->u.state.dostroke = sc->layers[layer].dostroke;
656 651 undo->u.state.fillfirst = sc->layers[layer].fillfirst;
657   -#endif
658 652 undo->copied_from = sc->parent;
659 653 return( AddUndo(undo,&sc->layers[layer].undoes,&sc->layers[layer].redoes));
660 654 }
@@ -669,13 +663,11 @@ return( _SCPreserveLayer(sc,layer,dohints));
669 663
670 664
671 665 Undoes *SCPreserveState(SplineChar *sc,int dohints) {
672   -#ifdef FONTFORGE_CONFIG_TYPE3
673 666 int i;
674 667
675 668 if ( sc->parent->multilayer )
676 669 for ( i=ly_fore+1; i<sc->layer_cnt; ++i )
677 670 SCPreserveLayer(sc,i,false);
678   -#endif
679 671 return( SCPreserveLayer(sc,ly_fore,dohints));
680 672 }
681 673
@@ -696,13 +688,11 @@ return(NULL);
696 688 undo->was_order2 = sf->grid.order2;
697 689 undo->u.state.splines = SplinePointListCopy(sf->grid.splines);
698 690 undo->u.state.images = ImageListCopy(sf->grid.images);
699   -#ifdef FONTFORGE_CONFIG_TYPE3
700 691 undo->u.state.fill_brush = sf->grid.fill_brush;
701 692 undo->u.state.stroke_pen = sf->grid.stroke_pen;
702 693 undo->u.state.dofill = sf->grid.dofill;
703 694 undo->u.state.dostroke = sf->grid.dostroke;
704 695 undo->u.state.fillfirst = sf->grid.fillfirst;
705   -#endif
706 696 undo->copied_from = sf;
707 697 return( AddUndo(undo,&sf->grid.undoes,&sf->grid.redoes));
708 698 }
@@ -1016,7 +1006,6 @@ void _CVUndoCleanup(CharViewBase *cv,PressedOn *p) {
1016 1006
1017 1007 if ( !p->anysel || p->transanyrefs ) {
1018 1008 for ( uref=undo->u.state.refs; uref!=NULL; uref=uref->next ) {
1019   -#ifdef FONTFORGE_CONFIG_TYPE3
1020 1009 int i;
1021 1010 for ( i=0; i<uref->layer_cnt; ++i ) {
1022 1011 SplinePointListsFree(uref->layers[i].splines);
@@ -1028,10 +1017,6 @@ void _CVUndoCleanup(CharViewBase *cv,PressedOn *p) {
1028 1017 free(uref->layers);
1029 1018 uref->layers = NULL;
1030 1019 uref->layer_cnt = 0;
1031   -#else
1032   - SplinePointListsFree(uref->layers[0].splines);
1033   - uref->layers[0].splines = NULL;
1034   -#endif
1035 1020 }
1036 1021 }
1037 1022 undo->undotype = ut_state;
@@ -1129,12 +1114,10 @@ void CopyBufferFree(void) {
1129 1114 UHintListFree(copybuffer.u.state.hints);
1130 1115 free(copybuffer.u.state.instrs);
1131 1116 ImageListsFree(copybuffer.u.state.images);
1132   -#ifdef FONTFORGE_CONFIG_TYPE3
1133 1117 GradientFree(copybuffer.u.state.fill_brush.gradient);
1134 1118 PatternFree(copybuffer.u.state.fill_brush.pattern);
1135 1119 GradientFree(copybuffer.u.state.stroke_pen.brush.gradient);
1136 1120 PatternFree(copybuffer.u.state.stroke_pen.brush.pattern);
1137   -#endif
1138 1121 break;
1139 1122 case ut_bitmapsel:
1140 1123 BDFFloatFree(copybuffer.u.bmpstate.selection);
@@ -1254,9 +1237,7 @@ return( head );
1254 1237
1255 1238 #ifndef _NO_LIBXML
1256 1239 static int FFClipToSC(SplineChar *dummy,Undoes *cur) {
1257   -#ifdef FONTFORGE_CONFIG_TYPE3
1258 1240 int lcnt;
1259   -#endif
1260 1241
1261 1242 if ( cur==NULL )
1262 1243 return( false );
@@ -1269,7 +1250,6 @@ return( false );
1269 1250 if ( dummy->parent==NULL )
1270 1251 dummy->parent = FontViewFirst()->sf; /* Might not be right, but we need something */
1271 1252 dummy->width = cur->u.state.width;
1272   -#ifdef FONTFORGE_CONFIG_TYPE3
1273 1253 if ( cur->undotype==ut_layers ) {
1274 1254 Undoes *ulayer;
1275 1255 for ( ulayer = cur->u.multiple.mult, lcnt=0; ulayer!=NULL; ulayer=ulayer->next, ++lcnt);
@@ -1287,14 +1267,11 @@ return( false );
1287 1267 }
1288 1268 }
1289 1269 } else
1290   -#endif
1291 1270 {
1292   -#ifdef FONTFORGE_CONFIG_TYPE3
1293 1271 dummy->layers[ly_fore].fill_brush = cur->u.state.fill_brush;
1294 1272 dummy->layers[ly_fore].stroke_pen = cur->u.state.stroke_pen;
1295 1273 dummy->layers[ly_fore].dofill = cur->u.state.dofill;
1296 1274 dummy->layers[ly_fore].dostroke = cur->u.state.dostroke;
1297   -#endif
1298 1275 dummy->layers[ly_fore].splines = cur->u.state.splines;
1299 1276 dummy->layers[ly_fore].refs = XCopyInstanciateRefs(cur->u.state.refs,dummy,ly_fore);
1300 1277 }
@@ -1475,7 +1452,6 @@ return( copy(""));
1475 1452 dummy.parent = cur->u.multiple.mult->copied_from;
1476 1453 if ( dummy.parent==NULL )
1477 1454 dummy.parent = FontViewFirst()->sf; /* Might not be right, but we need something */
1478   -#ifdef FONTFORGE_CONFIG_TYPE3
1479 1455 if ( cur->undotype==ut_layers ) {
1480 1456 Undoes *ulayer;
1481 1457 for ( ulayer = cur->u.multiple.mult, lcnt=0; ulayer!=NULL; ulayer=ulayer->next, ++lcnt);
@@ -1492,15 +1468,11 @@ return( copy(""));
1492 1468 dummy.layers[lcnt].refs = XCopyInstanciateRefs(ulayer->u.state.refs,&dummy,ly_fore);
1493 1469 }
1494 1470 }
1495   - } else
1496   -#endif
1497   - {
1498   -#ifdef FONTFORGE_CONFIG_TYPE3
  1471 + } else {
1499 1472 dummy.layers[ly_fore].fill_brush = cur->u.state.fill_brush;
1500 1473 dummy.layers[ly_fore].stroke_pen = cur->u.state.stroke_pen;
1501 1474 dummy.layers[ly_fore].dofill = cur->u.state.dofill;
1502 1475 dummy.layers[ly_fore].dostroke = cur->u.state.dostroke;
1503   -#endif
1504 1476 dummy.layers[ly_fore].splines = cur->u.state.splines;
1505 1477 dummy.layers[ly_fore].refs = XCopyInstanciateRefs(cur->u.state.refs,&dummy,ly_fore);
1506 1478 }
@@ -1719,7 +1691,6 @@ void CopyReference(SplineChar *sc) {
1719 1691 copybuffer.u.state.vwidth = sc->vwidth;
1720 1692 copybuffer.u.state.refs = ref = RefCharCreate();
1721 1693 copybuffer.copied_from = sc->parent;
1722   -#ifdef FONTFORGE_CONFIG_TYPE3
1723 1694 if ( ly_fore<sc->layer_cnt ) {
1724 1695 BrushCopy(&copybuffer.u.state.fill_brush, &sc->layers[ly_fore].fill_brush,NULL);
1725 1696 PenCopy(&copybuffer.u.state.stroke_pen, &sc->layers[ly_fore].stroke_pen,NULL);
@@ -1727,7 +1698,6 @@ void CopyReference(SplineChar *sc) {
1727 1698 copybuffer.u.state.dostroke = sc->layers[ly_fore].dostroke;
1728 1699 copybuffer.u.state.fillfirst = sc->layers[ly_fore].fillfirst;
1729 1700 }
1730   -#endif
1731 1701 ref->unicode_enc = sc->unicodeenc;
1732 1702 ref->orig_pos = sc->orig_pos;
1733 1703 ref->adobe_enc = getAdobeEnc(sc->name);
@@ -1785,7 +1755,6 @@ void CopySelected(CharViewBase *cv,int doanchors) {
1785 1755 copybuffer.u.state.images = new;
1786 1756 }
1787 1757 }
1788   -#ifdef FONTFORGE_CONFIG_TYPE3
1789 1758 if ( cv->drawmode==dm_fore || cv->drawmode==dm_back ) {
1790 1759 BrushCopy(&copybuffer.u.state.fill_brush, &cv->layerheads[cv->drawmode]->fill_brush,NULL);
1791 1760 PenCopy(&copybuffer.u.state.stroke_pen, &cv->layerheads[cv->drawmode]->stroke_pen,NULL);
@@ -1793,7 +1762,6 @@ void CopySelected(CharViewBase *cv,int doanchors) {
1793 1762 copybuffer.u.state.dostroke = cv->layerheads[cv->drawmode]->dostroke;
1794 1763 copybuffer.u.state.fillfirst = cv->layerheads[cv->drawmode]->fillfirst;
1795 1764 }
1796   -#endif
1797 1765 copybuffer.copied_from = cv->sc->parent;
1798 1766
1799 1767 XClipCheckEps();
@@ -1864,7 +1832,6 @@ static Undoes *SCCopyAllLayer(SplineChar *sc,enum fvcopy_type full,int layer) {
1864 1832 ref->adobe_enc = getAdobeEnc(sc->name);
1865 1833 ref->transform[0] = ref->transform[3] = 1.0;
1866 1834 }
1867   -#ifdef FONTFORGE_CONFIG_TYPE3
1868 1835 if ( layer<sc->layer_cnt ) {
1869 1836 cur->u.state.images = ImageListCopy(sc->layers[layer].images);
1870 1837 BrushCopy(&cur->u.state.fill_brush, &sc->layers[layer].fill_brush,NULL);
@@ -1873,7 +1840,6 @@ static Undoes *SCCopyAllLayer(SplineChar *sc,enum fvcopy_type full,int layer) {
1873 1840 cur->u.state.dostroke = sc->layers[layer].dostroke;
1874 1841 cur->u.state.fillfirst = sc->layers[layer].fillfirst;
1875 1842 }
1876   -#endif
1877 1843 cur->copied_from = sc->parent;
1878 1844 }
1879 1845 return( cur );
@@ -2319,12 +2285,10 @@ static void _PasteToSC(SplineChar *sc,Undoes *paster,FontViewBase *fv,int pastei
2319 2285 sc->hstem = sc->vstem = NULL;
2320 2286 sc->hconflicts = sc->vconflicts = false;
2321 2287 }
2322   -#ifdef FONTFORGE_CONFIG_TYPE3
2323 2288 GradientFree(sc->layers[layer].fill_brush.gradient); sc->layers[layer].fill_brush.gradient = NULL;
2324 2289 PatternFree(sc->layers[layer].fill_brush.pattern); sc->layers[layer].fill_brush.pattern = NULL;
2325 2290 GradientFree(sc->layers[layer].stroke_pen.brush.gradient); sc->layers[layer].stroke_pen.brush.gradient = NULL;
2326 2291 PatternFree(sc->layers[layer].stroke_pen.brush.pattern); sc->layers[layer].stroke_pen.brush.pattern = NULL;
2327   -#endif
2328 2292 was_empty = true;
2329 2293 #ifdef FONTFORGE_CONFIG_PASTEAFTER
2330 2294 } else if ( pasteinto==2 ) {
@@ -2350,7 +2314,6 @@ static void _PasteToSC(SplineChar *sc,Undoes *paster,FontViewBase *fv,int pastei
2350 2314 } else if ( pasteinto==3 && trans!=NULL ) {
2351 2315 xoff = trans[4]; yoff = trans[5];
2352 2316 }
2353   -#ifdef FONTFORGE_CONFIG_TYPE3
2354 2317 if ( layer>=ly_fore && sc->layers[layer].splines==NULL &&
2355 2318 sc->layers[layer].refs==NULL && sc->layers[layer].images==NULL &&
2356 2319 sc->parent->multilayer ) {
@@ -2361,7 +2324,6 @@ static void _PasteToSC(SplineChar *sc,Undoes *paster,FontViewBase *fv,int pastei
2361 2324 sc->layers[layer].dostroke = paster->u.state.dostroke;
2362 2325 sc->layers[layer].fillfirst = paster->u.state.fillfirst;
2363 2326 }
2364   -#endif
2365 2327 if ( sc->layers[layer].order2 &&
2366 2328 !sc->layers[layer].background ) {
2367 2329 if ( paster->undotype==ut_statehint ) {
@@ -2393,7 +2355,6 @@ static void _PasteToSC(SplineChar *sc,Undoes *paster,FontViewBase *fv,int pastei
2393 2355 }
2394 2356 if ( !sc->searcherdummy )
2395 2357 APMerge(sc,paster->u.state.anchor);
2396   -#ifdef FONTFORGE_CONFIG_TYPE3
2397 2358 if ( paster->u.state.images!=NULL && sc->parent->multilayer ) {
2398 2359 ImageList *new, *cimg;
2399 2360 for ( cimg = paster->u.state.images; cimg!=NULL; cimg=cimg->next ) {
@@ -2405,10 +2366,6 @@ static void _PasteToSC(SplineChar *sc,Undoes *paster,FontViewBase *fv,int pastei
2405 2366 }
2406 2367 SCOutOfDateBackground(sc);
2407 2368 }
2408   -#else
2409   - /* Ignore any images, can't be in foreground level */
2410   - /* but might be hints */
2411   -#endif
2412 2369 if ( (paster->undotype==ut_statehint || paster->undotype==ut_statename ) &&
2413 2370 !sc->layers[layer].background ) {
2414 2371 if ( !pasteinto ) { /* Hints aren't meaningful unless we've cleared first */
@@ -2529,12 +2486,10 @@ static void PasteToSC(SplineChar *sc,int layer,Undoes *paster,FontViewBase *fv,
2529 2486 ImageListsFree(sc->layers[layer].images);
2530 2487 sc->layers[layer].images = NULL;
2531 2488 SCRemoveLayerDependents(sc,layer);
2532   -#ifdef FONTFORGE_CONFIG_TYPE3
2533 2489 GradientFree(sc->layers[layer].fill_brush.gradient); sc->layers[layer].fill_brush.gradient = NULL;
2534 2490 PatternFree(sc->layers[layer].fill_brush.pattern); sc->layers[layer].fill_brush.pattern = NULL;
2535 2491 GradientFree(sc->layers[layer].stroke_pen.brush.gradient); sc->layers[layer].stroke_pen.brush.gradient = NULL;
2536 2492 PatternFree(sc->layers[layer].stroke_pen.brush.pattern); sc->layers[layer].stroke_pen.brush.pattern = NULL;
2537   -#endif
2538 2493 }
2539 2494 } else
2540 2495 start = sc->layer_cnt;
@@ -2942,9 +2897,7 @@ static void _PasteToCV(CharViewBase *cv,SplineChar *cvsc,Undoes *paster) {
2942 2897 DBounds bb;
2943 2898 real transform[6];
2944 2899 int wasempty = false;
2945   -#ifdef FONTFORGE_CONFIG_TYPE3
2946 2900 int wasemptylayer = false;
2947   -#endif
2948 2901 int layer = CVLayer(cv);
2949 2902
2950 2903 if ( copybuffer.undotype == ut_none ) {
@@ -2967,7 +2920,6 @@ return;
2967 2920 break;
2968 2921 case ut_state: case ut_statehint: case ut_statename:
2969 2922 wasempty = SCWasEmpty(cvsc,-1);
2970   -#ifdef FONTFORGE_CONFIG_TYPE3
2971 2923 wasemptylayer = layer!=ly_grid && cvsc->layers[layer].splines==NULL &&
2972 2924 cvsc->layers[layer].refs==NULL;
2973 2925 if ( wasemptylayer && cv->layerheads[dm_fore]->images==NULL &&
@@ -2979,7 +2931,6 @@ return;
2979 2931 cv->layerheads[dm_fore]->dostroke = paster->u.state.dostroke;
2980 2932 cv->layerheads[dm_fore]->fillfirst = paster->u.state.fillfirst;
2981 2933 }
2982   -#endif
2983 2934 if ( cv->layerheads[cv->drawmode]->order2 &&
2984 2935 !cv->layerheads[cv->drawmode]->background ) {
2985 2936 if ( paster->undotype==ut_statehint ) {
6 fontforge/diffstubs.c
@@ -646,7 +646,6 @@ return( sf );
646 646
647 647 RefChar *RefCharCreate(void) {
648 648 RefChar *ref = chunkalloc(sizeof(RefChar));
649   -#ifdef FONTFORGE_CONFIG_TYPE3
650 649 ref->layers = gcalloc(1,sizeof(struct reflayer));
651 650 ref->layers[0].fill_brush.opacity = ref->layers[0].stroke_pen.brush.opacity = 1.0;
652 651 ref->layers[0].fill_brush.col = ref->layers[0].stroke_pen.brush.col = COLOR_INHERITED;
@@ -654,7 +653,6 @@ RefChar *RefCharCreate(void) {
654 653 ref->layers[0].stroke_pen.linecap = lc_inherited;
655 654 ref->layers[0].stroke_pen.linejoin = lj_inherited;
656 655 ref->layers[0].dofill = true;
657   -#endif
658 656 ref->layer_cnt = 1;
659 657 return( ref );
660 658 }
@@ -669,7 +667,6 @@ void chunkfree(void *item,int size) {
669 667
670 668 void LayerDefault(Layer *layer) {
671 669 memset(layer,0,sizeof(Layer));
672   -#ifdef FONTFORGE_CONFIG_TYPE3
673 670 layer->fill_brush.opacity = layer->stroke_pen.brush.opacity = 1.0;
674 671 layer->fill_brush.col = layer->stroke_pen.brush.col = COLOR_INHERITED;
675 672 layer->stroke_pen.width = WIDTH_INHERITED;
@@ -679,7 +676,6 @@ void LayerDefault(Layer *layer) {
679 676 layer->fillfirst = true;
680 677 layer->stroke_pen.trans[0] = layer->stroke_pen.trans[3] = 1.0;
681 678 layer->stroke_pen.trans[1] = layer->stroke_pen.trans[2] = 0.0;
682   -#endif
683 679 }
684 680
685 681 SplineChar *SplineCharCreate(int layer_cnt) {
@@ -1035,10 +1031,8 @@ void AnchorPointsFree(AnchorPoint *ap) {
1035 1031 }
1036 1032 }
1037 1033
1038   -#ifdef FONTFORGE_CONFIG_TYPE3
1039 1034 void SFSplinesFromLayers(SplineFont *sf,int flag) {
1040 1035 }
1041   -#endif
1042 1036
1043 1037 void AltUniFigure(SplineFont *sf,EncMap *map,int check_dups) {
1044 1038 }
24 fontforge/dumppfa.c
@@ -40,10 +40,8 @@
40 40 #include <time.h>
41 41 #include "psfont.h"
42 42 #include "splinefont.h"
43   -#ifdef FONTFORGE_CONFIG_TYPE3
44   - #include <gdraw.h> /* For image defn */
45   - #include "print.h" /* For makePatName */
46   -#endif
  43 +#include <gdraw.h> /* For image defn */
  44 +#include "print.h" /* For makePatName */
47 45
48 46 #ifdef __CygWin
49 47 #include <sys/types.h>
@@ -527,7 +525,6 @@ return( false );
527 525 return( true );
528 526 }
529 527
530   -#ifdef FONTFORGE_CONFIG_TYPE3
531 528 static void dumpGradient(void (*dumpchar)(int ch,void *data), void *data,
532 529 struct gradient *grad, RefChar *ref, SplineChar *sc, int layer, int pdfopers, int isstroke ) {
533 530
@@ -716,7 +713,6 @@ static void dumppen(void (*dumpchar)(int ch,void *data), void *data,
716 713 dumpf(dumpchar,data,pdfopers ? "] 0 d\n" : "] 0 setdash\n");
717 714 }
718 715 }
719   -#endif
720 716
721 717 struct psfilter {