Index: trunk/Ohana/src/kapa/graph/RotFont.c
===================================================================
--- trunk/Ohana/src/kapa/graph/RotFont.c	(revision 5610)
+++ trunk/Ohana/src/kapa/graph/RotFont.c	(revision 5611)
@@ -1,6 +1,13 @@
 # include "Ximage.h"
 # include "alphabet.h"
-# define NROT 256
   
+static int Nrotfonts;
+static FontSet *RotFonts;
+
+static char currentname[64];
+static int  currentsize;
+static double currentscale;
+static RotFont *currentfont;
+
 void InitRotFonts () {
 
@@ -9,15 +16,15 @@
   Nhardwired = sizeof (HardwiredFonts) / sizeof (FontSet);
   
-  Nallfonts = Nhardwired;
-  ALLOCATE (AllFonts, FontSet, Nallfonts);
+  Nrotfonts = Nhardwired;
+  ALLOCATE (RotFonts, FontSet, Nrotfonts);
   
   for (i = 0; i < Nhardwired; i++) {
-    AllFonts[i] = HardwiredFonts[i];
+    RotFonts[i] = HardwiredFonts[i];
   }
 
-  activefont = AllFonts[DEFFONT].font;
-  activescale = 1.0;
-  strcpy (currentname, AllFonts[DEFFONT].name);
-  currentsize = AllFonts[DEFFONT].size;
+  currentfont = RotFonts[DEFFONT].font;
+  currentscale = 1.0;
+  strcpy (currentname, RotFonts[DEFFONT].name);
+  currentsize = RotFonts[DEFFONT].size;
 }
 
@@ -29,13 +36,13 @@
   dsize = 10000;
   bsize = 10000;
-  for (i = 0; i < Nallfonts; i++) {
-    if (!strcasecmp (AllFonts[i].name, name)) {
+  for (i = 0; i < Nrotfonts; i++) {
+    if (!strcasecmp (RotFonts[i].name, name)) {
       good = i;
-      nsize = abs (AllFonts[i].size - size);
+      nsize = abs (RotFonts[i].size - size);
       if (nsize < dsize) {
 	match = i;
 	dsize = nsize;
       }
-      msize = AllFonts[i].size - size;
+      msize = RotFonts[i].size - size;
       if ((msize < bsize) && (msize >= 0)) {
 	bigger = i;
@@ -48,6 +55,6 @@
   if (bigger != -1) match = bigger;
   if (match != -1) {
-    activefont = AllFonts[match].font;
-    activescale = (double) size / AllFonts[match].size;
+    currentfont = RotFonts[match].font;
+    currentscale = (double) size / RotFonts[match].size;
     currentsize = size;
     strcpy (currentname, name);
@@ -67,4 +74,9 @@
 }
 
+RotFont *GetRotFontData (double *scale) {
+  *scale = currentscale;
+  return (currentfont);
+}
+
 int RotStrlen (char *c) {
 
@@ -72,5 +84,5 @@
   double scale; 
   
-  scale = activescale;
+  scale = currentscale;
 
   /* find string length */
@@ -94,5 +106,5 @@
       }
       if (N == 124) { /* normal-script */
-	scale = activescale;
+	scale = currentscale;
 	continue;
       }
@@ -107,5 +119,5 @@
     }
     code = FALSE;
-    dX += scale*activefont[N].dx + 1;
+    dX += scale*currentfont[N].dx + 1;
   }
   return (dX);
