This patch fixes an issue when Ted is used in Fedora Core Three where
Ted is unable to find fonts at all.  This patch is a hack, since it
basically redoes the entire "find a font" process in a different
manner.  This patch assumes that the following fonts are on your system:

-adobe-times-[bold|medium]-[r|i]-*-*-[12|14|17|18|24]-*-*-*-*-*-iso8859-1
-adobe-courier-[bold|medium]-[r|o]-*-*-[12|14|17|18|24]-*-*-*-*-*-iso8859-1
-adobe-helvetica-[bold|medium]-[r|o]-*-*-[12|14|17|18|24]-*-*-*-*-*-iso8859-1

In particular, the following fonts are in the fonts-xorg-75dpi-6.8.1-1
rpm file:

-adobe-times-[bold|medium]-[r|i]-*-*-[12|14|18|24]-*-*-*-*-*-iso8859-1
-adobe-courier-[bold|medium]-[r|o]-*-*-[12|14|18|24]-*-*-*-*-*-iso8859-1
-adobe-helvetica-[bold|medium]-[r|o]-*-*-[12|14|18|24]-*-*-*-*-*-iso8859-1

In the following pcf files:

timB12-ISO8859-1.pcf.gz
timB14-ISO8859-1.pcf.gz
timB18-ISO8859-1.pcf.gz
timB24-ISO8859-1.pcf.gz
timBI12-ISO8859-1.pcf.gz
timBI14-ISO8859-1.pcf.gz
timBI18-ISO8859-1.pcf.gz
timBI24-ISO8859-1.pcf.gz
timI12-ISO8859-1.pcf.gz
timI14-ISO8859-1.pcf.gz
timI18-ISO8859-1.pcf.gz
timI24-ISO8859-1.pcf.gz
timR12-ISO8859-1.pcf.gz
timR14-ISO8859-1.pcf.gz
timR18-ISO8859-1.pcf.gz
timR24-ISO8859-1.pcf.gz
courB12-ISO8859-1.pcf.gz
courB14-ISO8859-1.pcf.gz
courB18-ISO8859-1.pcf.gz
courB24-ISO8859-1.pcf.gz
courBO12-ISO8859-1.pcf.gz
courBO14-ISO8859-1.pcf.gz
courBO18-ISO8859-1.pcf.gz
courBO24-ISO8859-1.pcf.gz
courO12-ISO8859-1.pcf.gz
courO14-ISO8859-1.pcf.gz
courO18-ISO8859-1.pcf.gz
courO24-ISO8859-1.pcf.gz
courR12-ISO8859-1.pcf.gz
courR14-ISO8859-1.pcf.gz
courR18-ISO8859-1.pcf.gz
courR24-ISO8859-1.pcf.gz
helvB12-ISO8859-1.pcf.gz
helvB14-ISO8859-1.pcf.gz
helvB18-ISO8859-1.pcf.gz
helvB24-ISO8859-1.pcf.gz
helvBO12-ISO8859-1.pcf.gz
helvBO14-ISO8859-1.pcf.gz
helvBO18-ISO8859-1.pcf.gz
helvBO24-ISO8859-1.pcf.gz
helvO12-ISO8859-1.pcf.gz
helvO14-ISO8859-1.pcf.gz
helvO18-ISO8859-1.pcf.gz
helvO24-ISO8859-1.pcf.gz
helvR12-ISO8859-1.pcf.gz
helvR14-ISO8859-1.pcf.gz
helvR18-ISO8859-1.pcf.gz
helvR24-ISO8859-1.pcf.gz

And the following fonts are in the fonts-xorg-100dpi-6.8.1-1 rpm file:

-adobe-times-[bold|medium]-[r|i]-*-*-[14|17]-*-*-*-*-*-iso8859-1
-adobe-courier-[bold|medium]-[r|o]-*-*-[14|17]-*-*-*-*-*-iso8859-1
-adobe-helvetica-[bold|medium]-[r|o]-*-*-[14|17]-*-*-*-*-*-iso8859-1

In the following pcf files:

(10: 14 pixsize; 12: 17 pixsize)

timB10-ISO8859-1.pcf.gz
timB12-ISO8859-1.pcf.gz
timBI10-ISO8859-1.pcf.gz
timBI12-ISO8859-1.pcf.gz
timI10-ISO8859-1.pcf.gz
timI12-ISO8859-1.pcf.gz
timR10-ISO8859-1.pcf.gz
timR12-ISO8859-1.pcf.gz
courB10-ISO8859-1.pcf.gz
courB12-ISO8859-1.pcf.gz
courBO10-ISO8859-1.pcf.gz
courBO12-ISO8859-1.pcf.gz
courO10-ISO8859-1.pcf.gz
courO12-ISO8859-1.pcf.gz
courR10-ISO8859-1.pcf.gz
courR12-ISO8859-1.pcf.gz
helvB10-ISO8859-1.pcf.gz
helvB12-ISO8859-1.pcf.gz
helvBO10-ISO8859-1.pcf.gz
helvBO12-ISO8859-1.pcf.gz
helvO10-ISO8859-1.pcf.gz
helvO12-ISO8859-1.pcf.gz
helvR10-ISO8859-1.pcf.gz
helvR12-ISO8859-1.pcf.gz

diff -ur Ted-2.17/appFrame/appFont.c Ted-2.17-patched/appFrame/appFont.c
--- Ted-2.17/appFrame/appFont.c	2005-01-26 22:16:09.000000000 -0800
+++ Ted-2.17-patched/appFrame/appFont.c	2005-03-09 20:34:19.915675872 -0800
@@ -767,6 +767,13 @@
     const char *		t1Entry= (const char *)0;
     const char *		scalableEntry= (const char *)0;
 
+    /*printf("%s %s %d %d\n",target,aff->affFontFamilyName,encoding,pixelSize); / *DEBUG*/
+    /* Debug: the aff structure * /
+    printf("%s %s %d %d %d %d %d %d\n",aff->affFontFamilyName,aff->affFontFamilyName_Orig,aff->affFaceCount,aff->affHasFixedWidth,aff->affHasProportionalWidth,aff->affUseFontspecificEncoding,aff->affDefaultEncoding,aff->affWidth);
+    printf("%s %d %d %d %d %d %s\n",aft->aftFaceName,aft->aftIsBold,aft->aftIsSlanted,aft->aftWidth,aft->aftWeight,aft->aftDefaultEncoding,aft->aftFontSpecificQueryFormat); / * End debug */
+
+    fflush(stdout);
+
     if  ( ! aff || ! aft )
 	{ XXDEB(aff,aft); return -1;	}
 
@@ -852,7 +859,116 @@
 	    return 0;
 	    }
 
-	SLDEB(aff->affFontFamilyName,encoding);
+	/* Debug message no longer needed now that we have fallback */
+	/*SLDEB(aff->affFontFamilyName,encoding);*/
+        /* We have a special fallback mode for Times/Helvetica
+         * which resembles what we are looking for: FC3 font issue fix
+         */
+        if(strcmp(aff->affFontFamilyName,"Times") == 0 ||
+           strcmp(aff->affFontFamilyName,"Courier") == 0 ||
+	   strcmp(aff->affFontFamilyName,"Helvetica") == 0) {
+	     int usebold = 0;
+	     int useitalic = 0;
+	     char fontstr[80];
+	     if(strcpy(fontstr,"-adobe-") == NULL) {
+		     printf("Fatal...");
+		     exit(10);
+	     }
+	     if(strcat(fontstr,aff->affFontFamilyName) == NULL) {
+		     printf("Fatal....");
+		     exit(10);
+	     }
+	     /*printf("Changing target...\n");
+	     fflush(stdout);*/
+	     if(aft != NULL) {
+		     /*printf("%d\n",aft->aftIsSlanted);*/
+		     if(aft->aftIsBold == 1) {
+	     		if(strcat(fontstr,"-bold-") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+		     } else {
+	     		if(strcat(fontstr,"-medium-") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+		     }
+		     if(aft->aftIsSlanted == 0) {
+	     		if(strcat(fontstr,"r-*-*-") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+		     } else if(strcmp(aff->affFontFamilyName,"Times") == 0) {
+	     		if(strcat(fontstr,"i-*-*-") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+		     } else {
+	     		if(strcat(fontstr,"o-*-*-") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+		     }
+	     } else {
+		     if(strcat(fontstr,"-medium-r-*-*-") == NULL) {
+			     printf("Fatal...");
+			     exit(10);
+		     }
+	     }
+		     switch(pixelSize) {
+			     case 9:
+			     case 12:
+	     		if(strcat(fontstr,"12") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+			     case 11:
+			     case 14:
+	     		if(strcat(fontstr,"14") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+			     case 13:
+			     case 16:
+	     		if(strcat(fontstr,"17") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+			     case 22:
+	     		if(strcat(fontstr,"18") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+			     case 23:
+			     case 29:
+	     		if(strcat(fontstr,"24") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+	 		     default:
+	     		if(strcat(fontstr,"17") == NULL) {
+		     		printf("Fatal...");
+		     		exit(10);
+	     		}
+			break;
+	 		}
+	 if(strcat(fontstr,"-*-*-*-*-*-iso8859-1") == NULL) {
+		 printf("Fatal...\n");
+		 exit(12);
+	 }
+	 /*printf("%s\n",fontstr);
+	 fflush(stdout);*/
+	 strncpy(target,fontstr,80);
+	     }
+
+
+	     return 0;
+
 	fam= 0; xff= afe->afeXfontFamilies;
 	}
 
diff -ur Ted-2.17/appFrame/appFontTool.c Ted-2.17-patched/appFrame/appFontTool.c
--- Ted-2.17/appFrame/appFontTool.c	2005-01-26 22:16:09.000000000 -0800
+++ Ted-2.17-patched/appFrame/appFontTool.c	2005-03-09 03:00:37.000000000 -0800
@@ -31,18 +31,12 @@
 
 static int EditFontToolSizesHalfPoints[]=
 			    {
-			    2* 8,
-			    2* 9,
 			    2* 10,
-			    2* 11,
 			    2* 12,
+			    2* 13,
 			    2* 14,
-			    2* 16,
 			    2* 18,
 			    2* 24,
-			    2* 36,
-			    2* 48,
-			    2* 64
 			    };
 
 static const int EditFontToolSizeCount=
