[Tux4kids-commits] r229 - in tuxtype/trunk/tuxtype: . data data/themes data/themes/armenian data/themes/bokmal data/themes/brazilian-portuguese data/themes/brazilian-portuguese/words data/themes/catalan data/themes/dansk data/themes/deutsch data/themes/espanol data/themes/euskara data/themes/french data/themes/greek data/themes/italian data/themes/jamaican docs/en

dbruce-guest at alioth.debian.org dbruce-guest at alioth.debian.org
Thu Sep 6 10:58:23 UTC 2007


Author: dbruce-guest
Date: 2007-09-06 10:58:23 +0000 (Thu, 06 Sep 2007)
New Revision: 229

Added:
   tuxtype/trunk/tuxtype/data/themes/armenian/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/euskara/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/french/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/jamaican/keyboard.lst
Removed:
   tuxtype/trunk/tuxtype/data/themes/armenian/fonts/
Modified:
   tuxtype/trunk/tuxtype/alphabet.c
   tuxtype/trunk/tuxtype/data/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.am
   tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.in
   tuxtype/trunk/tuxtype/data/themes/bokmal/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.am
   tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.in
   tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/words/fingers.txt
   tuxtype/trunk/tuxtype/data/themes/catalan/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/dansk/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/deutsch/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/espanol/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/euskara/Makefile.am
   tuxtype/trunk/tuxtype/data/themes/french/Makefile.am
   tuxtype/trunk/tuxtype/data/themes/greek/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/italian/keyboard.lst
   tuxtype/trunk/tuxtype/data/themes/jamaican/Makefile.am
   tuxtype/trunk/tuxtype/data/themes/lang.po
   tuxtype/trunk/tuxtype/docs/en/howtotheme.html
   tuxtype/trunk/tuxtype/funcs.h
   tuxtype/trunk/tuxtype/globals.h
   tuxtype/trunk/tuxtype/practice.c
   tuxtype/trunk/tuxtype/theme.c
   tuxtype/trunk/tuxtype/titlescreen.c
Log:
practice.c should now be i18n-compliant; new code, array, and slightly different format for keyboard lists - themes updated accordingly


Modified: tuxtype/trunk/tuxtype/alphabet.c
===================================================================
--- tuxtype/trunk/tuxtype/alphabet.c	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/alphabet.c	2007-09-06 10:58:23 UTC (rev 229)
@@ -28,6 +28,7 @@
 #include "globals.h"
 #include "funcs.h"
 
+
 /* NOTE these are externed in globals.h so not static */
 /* the colors we use throughout the game */
 SDL_Color black;
@@ -38,6 +39,31 @@
 SDL_Color yellow;
 
 
+
+/* An individual item in the list of cached unicode characters that are rendered at   */
+/* the start of each game.                                                            */
+typedef struct uni_glyph {
+  wchar_t unicode_value;
+  SDL_Surface* white_glyph;
+  SDL_Surface* red_glyph;
+} uni_glyph;
+
+/* These are the arrays for the red and white letters: */
+static uni_glyph char_glyphs[MAX_UNICODES] = {0, NULL, NULL};
+
+/* An individual item in the list of unicode characters in the keyboard setup.   */
+/* Basically, just the Unicode value for the key and the finger used to type it. */
+typedef struct kbd_char {
+  wchar_t unicode_value;
+  char finger;
+} kbd_char;
+
+/* List with one entry for each typable character in keyboard setup - has the */
+/* Unicode value of the key and the associated fingering.                     */
+static kbd_char keyboard_list[MAX_UNICODES] = {0, -1};
+
+
+
 static TTF_Font* font = NULL;
 
 /* Used for word list functions (see below): */
@@ -46,16 +72,15 @@
 static wchar_t char_list[MAX_UNICODES];  // List of distinct letters in list
 static int num_chars_used = 0;       // Number of different letters in word list
 
-/* These are the arrays for the red and white letters: */
-static uni_glyph char_glyphs[MAX_UNICODES];
 
+
 /* Local function prototypes: */
 static void gen_char_list(void);
 static int add_char(wchar_t uc);
 static void set_letters(unsigned char* t);
 static void show_letters(void);
 static void clear_keyboard(void);
-static int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word);
+static int unicode_in_key_list(wchar_t uni_char);
 
 
 #ifndef WIN32
@@ -115,7 +140,7 @@
     wchar_t wide_str[255];
 
     FILE* f;
-    int i, j;
+    int i = 0, j = 0, k = 0;
 
     f = fopen( fn, "r" );
 
@@ -125,50 +150,44 @@
       return 0;
     }
 
+
     do
     {
       fscanf( f, "%[^\n]\n", str);
       /* Convert to wcs from UTF-8, if needed; */
       //mbstowcs(wide_str, str, strlen(str) + 1);
-      convert_from_UTF8(wide_str, str);
+      ConvertFromUTF8(wide_str, str);
 
-      if (wcslen(wide_str) > 3)
+      /* Line must have 3 chars (if more, rest are ignored) */
+      /* Format is: FINGER|Char  e.g   "3|d"                */
+      /* wide_str[0] == finger used to type char            */
+      /* wide_str[1] =='|'
+      /* wide_str[2] == Unicode value of character          */
+
+      /* FIXME - this might be a good place to use a    */
+      /* hash table to avoid n^2 performance problems.  */
+      /* Some sanity checks:  */
+      if ((wcslen(wide_str) >=3)
+       && (wcstol(&wide_str[0], NULL, 0) >=0)   /* These lines just make sure the */
+       && (wcstol(&wide_str[0], NULL, 0) < 10)  /* finger is between 0 and 10     */
+       && (wide_str[1] == '|')
+       && (k < MAX_UNICODES)
+       && !unicode_in_key_list(wide_str[2])) /* Make sure char not already added */
       {
-        /* format is: FINGER(s)|Char(s) Upper/Lower */
-
-        /* advance past the fingers */
-        for (i = 0; i < wcslen(wide_str) && wide_str[i] != '|'; i++);
-
-        i++; // pass the '|'
-        j = i; 
-        if ( ((int)wide_str[j] >= 0) 
-          && ((int)wide_str[j] < 256) )
+        DEBUGCODE
         {
-          ALPHABET[(int)wide_str[j]] = 1;  // first character is default
+          fprintf(stderr, "Adding key: Unicode char = %C, finger = %d\n",
+                  wide_str[2], wcstol(&wide_str[0], NULL, 0)); 
         }
-        else
-          fprintf(stderr, "LoadKeyboard() - Unicode char outside Western range\n");
-        //for (i++; i<wcslen(wide_str); i++)
-        //KEYMAP[(int)wide_str[i]] = wide_str[j];
 
-        /* set the fingers for this letter */
-        for (i=0; i<j-1; i++)
-        {
-          if (wide_str[i] >= '0' && wide_str[i] <= '9')
-          {
-            if ( ((int)wide_str[j] >= 0) 
-              && ((int)wide_str[j] < 256) )
-            {
-              FINGER[wide_str[j]][(int)(wide_str[i] - '0')] = 1;
-            }
-            else
-              fprintf(stderr, "LoadKeyboard() - Unicode char outside Western range\n");
-          }
-        }
-        ALPHABET_SIZE++;
+        /* Just plug values into array: */
+        keyboard_list[k].unicode_value = wide_str[2];
+        keyboard_list[k].finger = wcstol(&wide_str[0], NULL, 0);
+        k++;
       }
     } while (!feof(f));
 
+
     fclose(f);
 
     LOG("Leaving LoadKeyboard()\n");
@@ -176,7 +195,53 @@
   }
 }
 
+/* Returns the finger hint(0-9) associated with a given Unicode value */
+/* in the keyboard_list:                                              */
+/* Returns -1 if somehow no finger associated with a Unicode value    */
+/* in the list (shouldn't happen).                                    */
+/* Returns -2 if Unicode value not in list.                           */
+int GetFinger(wchar_t uni_char)
+{
+  int i = 0;
 
+  while ((i < MAX_UNICODES)
+     &&  (keyboard_list[i].unicode_value != uni_char))
+  {
+    i++;
+  }
+
+  if (i == MAX_UNICODES)
+  {
+    fprintf(stderr, "GetFinger() - Unicode char '%C' not found in list.\n");
+    return -2;
+  }
+
+  if ((keyboard_list[i].finger < 0)
+   || (keyboard_list[i].finger > 9))
+  {
+    fprintf(stderr, "GetFinger() - Unicode char '%C' has no valid finger.\n");
+    return -1;
+  }  
+
+  return (int)keyboard_list[i].finger; /* Keep compiler from complaining */
+}
+
+
+
+int unicode_in_key_list(wchar_t uni_char)
+{
+  int i = 0;
+  while ((i < MAX_UNICODES)
+     &&  (keyboard_list[i].unicode_value != uni_char))
+  {
+    i++;
+  }
+  if (i = MAX_UNICODES)
+    return 0;
+  else
+    return 1;
+}
+
 /* NOTE if we can consistently use SDLPango on all platforms, we can simply */
 /* rename the pango version to BlackOutline() and get rid of this one.      */
 /* The input for this function should be UTF-8.                             */
@@ -654,7 +719,7 @@
     /* NOTE need to add one to length arg so terminating '\0' gets added: */
     //length = mbstowcs(temp_wide_word, temp_word, strlen(temp_word) + 1);
 
-    length = convert_from_UTF8(temp_wide_word, temp_word);
+    length = ConvertFromUTF8(temp_wide_word, temp_word);
     DOUT(length);
 
     if (length == -1)  /* Means invalid UTF-8 sequence or conversion failed */
@@ -729,28 +794,31 @@
     return 0;
   }
 
-  i = num_chars_used = 0;
-  j = 0;
+  i = j = num_chars_used = 0;
+
   t[1] = '\0';
 
-  while (char_list[i] != '\0')
+  while (i < MAX_UNICODES)
   {
-    t[0] = char_list[i];
-    
-    DEBUGCODE
+    t[0] = keyboard_list[i].unicode_value;
+
+    if (t[0] != 0)
     {
-      fprintf(stderr, "Creating SDL_Surface for list element %d, char = %lc\n", i, *t);
-    }
+      DEBUGCODE
+      {
+        fprintf(stderr, "Creating SDL_Surface for list element %d, char = %lc\n", i, *t);
+      }
 
-    char_glyphs[j].unicode_value = t[0];
-    char_glyphs[j].white_glyph = BlackOutline_Unicode(t, letter_font, &white);
-    char_glyphs[j].red_glyph = BlackOutline_Unicode(t, letter_font, &red);
+      char_glyphs[j].unicode_value = t[0];
+      char_glyphs[j].white_glyph = BlackOutline_Unicode(t, letter_font, &white);
+      char_glyphs[j].red_glyph = BlackOutline_Unicode(t, letter_font, &red);
 
+      j++;
+      num_chars_used++;
+    }
     i++;
-    j++;
-    num_chars_used++;
   }
-  /* Remember how many letters we added: */
+
   return num_chars_used;
 }
 
@@ -877,7 +945,7 @@
   int i = 0;
   wchar_t wchar_buf[MAX_UNICODES];
 
-  convert_from_UTF8(wchar_buf, UTF8_str);
+  ConvertFromUTF8(wchar_buf, UTF8_str);
 
   /* FNLEN is max length of phrase (I think) */
   while (wchar_buf[i] != '\0' && i < FNLEN) 
@@ -951,22 +1019,24 @@
 }
 
 
-static void clear_keyboard( void ) {
-	int i,j;
 
-	ALPHABET_SIZE = 0;
-	for (i=0; i<256; i++) {
-		ALPHABET[i]=0;
-		for (j=0; j<10; j++)
-			FINGER[i][j]=0;
-	}
+static void clear_keyboard(void)
+{
+  int i = 0;
+  for (i = 0; i < MAX_UNICODES; i++)
+  {
+    keyboard_list[i].unicode_value = 0;
+    keyboard_list[i].finger = -1;
+  }
 }
+
+
 /* This function just tidies up all the ptr args needed for      */
 /* ConvertUTF8toUTF32() from Unicode, Inc. into a neat wrapper.  */
 /* It returns -1 on error, otherwise returns the length of the   */
 /* converted, null-terminated wchar_t* string now stored in the  */
 /* location of the 'wide_word' pointer.                          */
-static int convert_from_UTF8(wchar_t* wide_word, const char* UTF8_word)
+int ConvertFromUTF8(wchar_t* wide_word, const char* UTF8_word)
 {
   int i = 0;
   ConversionResult result;

Modified: tuxtype/trunk/tuxtype/data/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,69 +1,70 @@
-0|AA
-0|aa
-3|BB
-3|bb
-2|CC
-2|cc
-2|DD
-2|dd
-2|EE
-2|ee
-3|FF
-3|ff
-3|GG
-3|gg
-6|HH
-6|hh
-7|II
-7|ii
-6|JJ
-6|jj
-7|KK
-7|kk
-8|LL
-8|ll
-6|MM
-6|mm
-6|NN
-6|nn
-8|OO
-8|oo
-9|PP
-9|pp
-0|QQ
-0|qq
-3|RR
-3|rr
-1|SS
-1|ss
-3|TT
-3|tt
-6|UU
-6|uu
-3|VV
-3|vv
-1|WW
-1|ww
-1|XX
-1|xx
-6|YY
-6|yy
-0|ZZ
-0|zz
-5|  
-0|!!
-0|@@
-0|##
-0|11
-0|22
-0|33
-0|44
-0|55
-0|66
-0|77
-0|88
-0|99
-0|00
-7|,,
-8|..
-9|;;
+# Default (English) keyboard.lst file
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.am	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.am	2007-09-06 10:58:23 UTC (rev 229)
@@ -2,11 +2,13 @@
 SUBDIRS = \
 images
 
-EXTRA_DIST = lang.po
+EXTRA_DIST = lang.po keyboard.lst
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/keyboard.lst
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/keyboard.lst

Modified: tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.in
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.in	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/armenian/Makefile.in	2007-09-06 10:58:23 UTC (rev 229)
@@ -164,7 +164,7 @@
 SUBDIRS = \
 images
 
-EXTRA_DIST = lang.po
+EXTRA_DIST = lang.po keyboard.lst
 all: all-recursive
 
 .SUFFIXES:
@@ -476,9 +476,11 @@
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/keyboard.lst
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/armenian/keyboard.lst
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Added: tuxtype/trunk/tuxtype/data/themes/armenian/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/armenian/keyboard.lst	                        (rev 0)
+++ tuxtype/trunk/tuxtype/data/themes/armenian/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -0,0 +1,70 @@
+# keyboard.lst for Armenian theme
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/bokmal/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/bokmal/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/bokmal/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,75 +1,75 @@
-0|AA
-0|aa
-3|BB
-3|bb
-2|CC
-2|cc
-2|DD
-2|dd
-2|EE
-2|ee
-3|FF
-3|ff
-3|GG
-3|gg
-6|HH
-6|hh
-7|II
-7|ii
-6|JJ
-6|jj
-7|KK
-7|kk
-8|LL
-8|ll
-6|MM
-6|mm
-6|NN
-6|nn
-8|OO
-8|oo
-9|PP
-9|pp
-0|QQ
-0|qq
-3|RR
-3|rr
-1|SS
-1|ss
-3|TT
-3|tt
-6|UU
-6|uu
-3|VV
-3|vv
-1|WW
-1|ww
-1|XX
-1|xx
-6|YY
-6|yy
-0|ZZ
-0|zz
-9|ÆÆ
-9|ææ
-9|ØØ
-9|øø
-9|Ã…Ã…
-9|åå
-5|  
-0|!!
-0|@@
-0|##
-0|11
-0|22
-0|33
-0|44
-0|55
-0|66
-0|77
-0|88
-0|99
-0|00
-7|,,
-8|..
-9|;;
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+9|Æ
+9|æ
+9|Ø
+9|ø
+9|Ã…
+9|Ã¥
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.am	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.am	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,10 +1,12 @@
 SUBDIRS = images words
 
-EXTRA_DIST = lang.po
+EXTRA_DIST = lang.po keyboard.lst
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/keyboard.lst
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/keyboard.lst

Modified: tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.in
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.in	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/Makefile.in	2007-09-06 10:58:23 UTC (rev 229)
@@ -162,7 +162,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUBDIRS = images words
-EXTRA_DIST = lang.po
+EXTRA_DIST = lang.po keyboard.lst
 all: all-recursive
 
 .SUFFIXES:
@@ -474,9 +474,11 @@
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/keyboard.lst
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/brazilian-portuguese/keyboard.lst
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Added: tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/keyboard.lst	                        (rev 0)
+++ tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -0,0 +1,72 @@
+# keyboard.lst file for Brazilian-Portuguese theme
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;
+9|Ç
+9|ç

Modified: tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/words/fingers.txt
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/words/fingers.txt	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/brazilian-portuguese/words/fingers.txt	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,16 +1,16 @@
 Exercicios 1
-asdfg
-hjklç
-gfdsa
-çlkjh
-qwert
-yuiop
-trewq
-poiuy
-zxcvb
-nm,.;
-bvcxz
-;.,mn
+ASDFG
+HJKLÇ
+GFDSA
+ÇLKJH
+QWERT
+YUIOP
+TREWQ
+POIUY
+ZXCVB
+NM,.;
+BVCXZ
+;.,MN
 12345
 67890
 54321

Modified: tuxtype/trunk/tuxtype/data/themes/catalan/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/catalan/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/catalan/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,46 +1,93 @@
-0|Aa
-0|Qq
-0|Zz
-0|1!
-0|ºª
-0|<>
-1|Ss
-1|Ww
-1|Xx
-1|2"
-2|Dd
-2|Ee
-2|Cc
-2|3·
-3|Ff
-3|Gg
-3|Rr
-3|Tt
-3|Vv
-3|Bb
-3|4$
-3|5%
-6|Hh
-6|Jj
-6|Mm
-6|Nn
-6|Uu
-6|Yy
-6|6&
-6|7/
-7|Ii
-7|Kk
-7|,;
-7|8(
-8|Ll
-8|Oo
-8|.:
-8|9)
-9|Pp
-9|Ññ
-9|-_
-9|0=
-9|Çç
-9|+*
-9|'?
-9|¡¿
+# keyboard.lst for Catalan theme
+0|A
+0|a
+0|Q
+0|q
+0|Z
+0|z
+0|1
+0|!
+0|�
+0|�
+0|<
+0|>
+1|S
+1|s
+1|W
+1|w
+1|X
+1|x
+1|2
+1|"
+2|D
+2|d
+2|E
+2|e
+2|C
+2|c
+2|3
+2|�
+3|F
+3|f
+3|G
+3|g
+3|R
+3|r
+3|T
+3|t
+3|V
+3|v
+3|B
+3|b
+3|4
+3|$
+3|5
+3|%
+6|H
+6|h
+6|J
+6|j
+6|M
+6|m
+6|N
+6|n
+6|U
+6|u
+6|Y
+6|y
+6|6
+6|&
+6|7
+6|/
+7|I
+7|i
+7|K
+7|k
+7|,
+7|;
+7|8
+7|(
+8|L
+8|l
+8|O
+8|o
+8|.
+8|:
+8|9
+8|)
+9|P
+9|p
+9|�
+9|�
+9|-
+9|_
+9|0
+9|=
+9|�
+9|�
+9|+
+9|*
+9|'
+9|?
+9|�
+9|�

Modified: tuxtype/trunk/tuxtype/data/themes/dansk/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/dansk/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/dansk/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,29 +1,59 @@
-0|Aa
-6|Bb
-3|Cc
-2|Dd
-2|Ee
-3|Ff
-3|Gg
-6|Hh
-7|Ii
-6|Jj
-7|Kk
-8|Ll
-6|Mm
-6|Nn
-8|Oo
-9|Pp
-0|Qq
-3|Rr
-1|Ss
-3|Tt
-6|Uu
-3|Vv
-1|Ww
-1|Xx
-6|Yy
-0|Zz
-9|Ææ
-9|Øø
-9|Åå
+# keyboard.lst for Dansk theme
+0|A
+0|a
+6|B
+6|b
+3|C
+3|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+5|y
+0|Z
+0|z
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�

Modified: tuxtype/trunk/tuxtype/data/themes/deutsch/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/deutsch/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/deutsch/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,30 +1,60 @@
-0|Aa
-3|Bb
-3|Cc
-2|Dd
-2|Ee
-3|Ff
-3|Gg
-6|Hh
-7|Ii
-6|Jj
-7|Kk
-8|Ll
-6|Mm
-6|Nn
-8|Oo
-9|Pp
-0|Qq
-3|Rr
-1|Ss
-3|Tt
-6|Uu
-3|Vv
-1|Ww
-1|Xx
-0|Yy
-6|Zz
-9|Ää
-9|Öö
-9|Üü
-9|ß
+# keyboard.lst for German theme
+0|A
+0|a
+3|B
+3|b
+3|C
+3|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+0|Y
+0|y
+6|Z
+6|z
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�

Modified: tuxtype/trunk/tuxtype/data/themes/espanol/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/espanol/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/espanol/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,27 +1,55 @@
-0|Aa
-3|Bb
-3|Cc
-2|Dd
-2|Ee
-3|Ff
-3|Gg
-6|Hh
-7|Ii
-6|Jj
-7|Kk
-8|Ll
-6|Mm
-6|Nn
-8|Oo
-9|Pp
-0|Qq
-3|Rr
-1|Ss
-3|Tt
-6|Uu
-3|Vv
-1|Ww
-1|Xx
-6|Yy
-0|Zz
-9|Ññ
+# keyboard.lst for Spanish theme
+0|A
+0|a
+3|B
+3|b
+3|C
+3|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+9|�
+9|�

Modified: tuxtype/trunk/tuxtype/data/themes/euskara/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/euskara/Makefile.am	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/euskara/Makefile.am	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,14 +1,16 @@
 
 SUBDIRS = images words
 
-EXTRA_DIST = AUTHOR lang.po
+EXTRA_DIST = AUTHOR lang.po keyboard.lst
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara
 	$(INSTALL_DATA) $(srcdir)/AUTHOR $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/AUTHOR
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/keyboard.lst
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/AUTHOR
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/euskara/keyboard.lst

Added: tuxtype/trunk/tuxtype/data/themes/euskara/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/euskara/keyboard.lst	                        (rev 0)
+++ tuxtype/trunk/tuxtype/data/themes/euskara/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -0,0 +1,70 @@
+# Default (English) keyboard.lst file
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/french/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/french/Makefile.am	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/french/Makefile.am	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,15 +1,17 @@
 
-SUBDIRS = words
+SUBDIRS = words images
 
-EXTRA_DIST = lang.po
+EXTRA_DIST = lang.po keyboard.lst
 
 
 install-data-local:
 
 	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/french
 	$(INSTALL_DATA) $(srcdir)/lang.po $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/french/lang.po
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/french/keyboard.lst
 
 
 
 uninstall-local:
 	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/french/lang.po
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/french/keyboard.lst

Added: tuxtype/trunk/tuxtype/data/themes/french/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/french/keyboard.lst	                        (rev 0)
+++ tuxtype/trunk/tuxtype/data/themes/french/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -0,0 +1,70 @@
+# Default (English) keyboard.lst file
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/greek/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/greek/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/greek/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,35 +1,76 @@
-0|Áá¢Ü
-0|Ææ
+# keyboard.lst for Greek theme
+0|�
+0|�
+0|�
+0|�
+0|�
+0|�
 0|1
-1|Óó
-1|ò
-1|×÷
+1|�
+1|�
+1|�
+1|�
+1|�
 1|2
-2|Ää
-2|Åå¸Ý
-2|Øø
+2|�
+2|�
+2|�
+2|�
+2|�
+2|�
+2|�
+2|�
 2|3
-3|Öö
-3|Ãã
-3|Ññ
-3|Ôô
-3|Ùù¿þ
-3|Ââ
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
+3|�
 3|4
 3|5
-6|Çç¹Þ
-6|Îî
-6|Ìì
-6|Íí
-6|Èè
-6|Õõ¾ý
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
+6|�
 6|6
 6|7
-7|ÉéºßÚú
-7|Êê
+7|�
+7|�
+7|�
+7|�
+7|�
+7|�
+7|�
+7|�
 7|8
-8|Ëë
-8|Ïï¼ü
+8|�
+8|�
+8|�
+8|�
+8|�
+8|�
 8|9
-9|Ðð
+9|�
+9|�
 9|0

Modified: tuxtype/trunk/tuxtype/data/themes/italian/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/italian/keyboard.lst	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/italian/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,31 +1,62 @@
-0|Aa
-6|Bb
-2|Cc
-2|Dd
-2|Ee
-3|Ff
-3|Gg
-6|Hh
-7|Ii
-6|Jj
-7|Kk
-8|Ll
-6|Mm
-6|Nn
-8|Oo
-9|Pp
-0|Qq
-3|Rr
-1|Ss
-3|Tt
-6|Uu
-3|Vv
-1|Ww
-1|Xx
-6|Yy
-0|Zz
-9|éè
-9|ìì
-9|ùù
-9|àà
-9|òò
\ No newline at end of file
+# keyboard.lst for Italian theme
+0|A
+0|a
+6|B
+6|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�
+9|�
\ No newline at end of file

Modified: tuxtype/trunk/tuxtype/data/themes/jamaican/Makefile.am
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/jamaican/Makefile.am	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/jamaican/Makefile.am	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,3 +1,11 @@
 
 SUBDIRS = images words
 
+EXTRA_DIST = keyboard.lst 
+
+install-data-local:
+	$(mkinstalldirs) $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/jamaican
+	$(INSTALL_DATA) $(srcdir)/keyboard.lst $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/jamaican/keyboard.lst
+
+uninstall-local:
+	rm -f $(DESTDIR)$(prefix)/share/$(PACKAGE)/data/themes/jamaican/keyboard.lst

Added: tuxtype/trunk/tuxtype/data/themes/jamaican/keyboard.lst
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/jamaican/keyboard.lst	                        (rev 0)
+++ tuxtype/trunk/tuxtype/data/themes/jamaican/keyboard.lst	2007-09-06 10:58:23 UTC (rev 229)
@@ -0,0 +1,70 @@
+# Jamaican keyboard.lst file
+0|A
+0|a
+3|B
+3|b
+2|C
+2|c
+2|D
+2|d
+2|E
+2|e
+3|F
+3|f
+3|G
+3|g
+6|H
+6|h
+7|I
+7|i
+6|J
+6|j
+7|K
+7|k
+8|L
+8|l
+6|M
+6|m
+6|N
+6|n
+8|O
+8|o
+9|P
+9|p
+0|Q
+0|q
+3|R
+3|r
+1|S
+1|s
+3|T
+3|t
+6|U
+6|u
+3|V
+3|v
+1|W
+1|w
+1|X
+1|x
+6|Y
+6|y
+0|Z
+0|z
+5| 
+0|!
+0|@
+0|#
+0|1
+0|2
+0|3
+0|4
+0|5
+0|6
+0|7
+0|8
+0|9
+0|0
+7|,
+8|.
+9|;

Modified: tuxtype/trunk/tuxtype/data/themes/lang.po
===================================================================
--- tuxtype/trunk/tuxtype/data/themes/lang.po	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/data/themes/lang.po	2007-09-06 10:58:23 UTC (rev 229)
@@ -114,3 +114,6 @@
 #
 msgid "Main Menu"
 msgstr ""
+#
+msgid "Great!"
+msgstr ""
\ No newline at end of file

Modified: tuxtype/trunk/tuxtype/docs/en/howtotheme.html
===================================================================
--- tuxtype/trunk/tuxtype/docs/en/howtotheme.html	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/docs/en/howtotheme.html	2007-09-06 10:58:23 UTC (rev 229)
@@ -1,11 +1,11 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
 <head>
-<title>How to create a theme for TuxTyping 1.5.1</title>
+<title>How to create a theme for Tux Typing 1.5.13</title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 </head>
 <body bgcolor="#ffffff">
-<h2>Theming in Tuxtyping 1.5.1</h2>
+<h2>Theming in Tux Typing 1.5.13</h2>
 <p>A "Theme" is a method to change the data which Tuxtyping uses.  While this could be used to change the game about Tux and fish, to a game about a Cat and mice, more likely you are interested in making Tuxtyping work in another language. (if you are intersted in creating a new graphical theme like "Racecars" or ... that is cool too, but if things don't act right, please <a href="http://tux4kids.alioth.debian.org">contact us</a>).
 <p>I will walk through how I created the "French" theme in boxes in this text.
 <h3>Difference to Tuxtyping 1.0</h3>
@@ -27,7 +27,7 @@
 <ol>
 <li>Creating the directory and adding it to menu system
 
-<p>Themes are located in the data directory of Tuxtyping 2.  This will be different depending on which operating system you are using.  If you have trouble finding where the data directory is for your system, contact <a href="mailto:tuxmath-devel at lists.sourceforge.net">us</a>.  I will refer to this directory containing themes as <b>data/themes/</b>
+<p>Themes are located in the data directory of Tux Typing.  This will be different depending on which operating system you are using.  If you have trouble finding where the data directory is for your system, contact <a href="mailto:tuxmath-devel at lists.sourceforge.net">us</a>.  I will refer to this directory containing themes as <b>data/themes/</b>
 <p>Each theme has its own directory in the <b>data/themes/</b> directory.  For instance if you are creating a French theme, you would create a directory called <b>french</b> in the themes directory, so you have <b>data/themes/french</b>.  All of the data for your theme will be located in this directory.
 <p>Now if you go into the game, you should see a new entry in the "Setup Languages" menu for your theme.
 <center><table bgcolor="#ccccff" width="75%" border=1 cellpadding=4><tr><td> 
@@ -39,20 +39,18 @@
 </td></tr></table></center>
 <br>
 <li>Fonts
-<p>You may need to find a truetype font for your language.  The included font may work for many languages (Danish, French, ...) that are based on latin characters.  Languages such as Armenian will need to have a different font!
-<p>We actually allow you to specify two different fonts.  One font menu.ttf is the main font used everywhere in the program except for the the game objects (for instance the letters on the fish or comets or in the tutor game).  If you don't need a different font for two usages, just copy the font to both menu.ttf and letters.ttf
+<p>Tux Typing currently uses three fonts (AndikaDesRevG.ttf, DoulosSILR.ttf, and Rachana_w01.ttf) to provide glyphs for the included themes. The default font is Andika, which has glyphs for English and other Western European languages. Doulos has wider coverage, and is included to support the Cyrillic characters needed for the Russian theme. Rachana provides glyphs for the Malayalam theme. If your theme works with the default Andika font, you do not need to specify anything.  If one of the other fonts is needed, your theme directory needs to have a file "settings.txt" containing a line indicating your font selection, e.g.:
+<br>
+theme_font_name=Rachana_w01.ttf
+<br>
+
+Currently, the font name must exactly match one of the supported fonts, or you will wind up with the default.  Note - all non-ASCII text needs to be encoded as UTF-8.  This is not an issue for file names, but it is an issue when adding themes that require Unicode support.
+
+<p>If you want to customize Tux Typing with another font, you can copy the *.ttf font file into data/fonts/ (alongside Andika, Doulos, and Rachana) and put the exact font file name into your theme's settings.txt file, and Tux Typing will use it.
+
 <center><table bgcolor="#ccccff" width="75%" border=1 cellpadding=4><tr><td> 
-Since the non A-Z characters in French are in the default fonts, I didn't need to do the following:
-<br><pre>    cd data/themes/french
 
-    mkdir fonts
-    cd fonts
 
-    cp /home/jdandr2/frenchfont.ttf menu.ttf
-    cp /home/jdandr2/frenchfont.ttf letters.ttf 
-
-</pre>
-</td></tr></table></center>
 <p>
 <li>Translation
 <p>To change the words that are within the menus and other parts of the game, you will need to create and edit a <b>lang.po</b> file.  We have created a master lang.po file that is located in the <b>data/themes</b> directory.  To start with, you should copy this file into your theme's directory.
@@ -64,7 +62,7 @@
 </pre>
 </td></tr></table></center>
 
-<p>This files is your your standard "gettext" type .po file.  It is comprised of a sequence of msgid & msgstr pairs.  The msgid is the string of words in English, what you will need to do is after edit each msgstr in the file so it corresponds to the msgid right about it.
+<p>This files is your your standard "gettext" type .po file.  It is comprised of a sequence of msgid & msgstr pairs.  The msgid is the string of words in English, what you will need to do is after edit each msgstr in the file so it corresponds to the msgid right about it.  If your language uses non-Western Unicode characters, be sure to use a UTF-8 encoding for this file!
 
 <center><table bgcolor="#ccccff" width="75%" border=1 cellpadding=4><tr><td> 
 For instance my <b>data/themes/french/lang.po</b> has the following lines:
@@ -93,10 +91,10 @@
 <p>Now you need to setup what characters (like ABCDEFGHIJKLMNOPQRSTUVWXYZ), you are going to have the player hit within the game.  There are several things you need to specify.  First let me explain with an example.  In the English version, we don't mind if the user hit "A" or "a", we want it to mean the same thing "A" (we choose uppercase (capital) letters since they are easier to read).  We also need to specify that the player would normally use the "0" finger to hit the key (see image)
 <p>
 <center><img src="numhand.jpg" alt="0 1 2 3 4 5 6 7 8 9"></center>
-<p>So you need to create a <b>keyboard.lst</b> file.  This file will contain all the characters that you wish to be in your alphabet.  The format for the file is:
-<center>0|Aa</center>
+<p>So you need to create a <b>keyboard.lst</b> file.  This file will contain all the characters that you wish to be typable.  The format for the file is:
+<center>0|A</center>
 <p>
-First you list the finger(s) that the player should use to press this letter, then a seperator |, then the letter(s) that the users can press that mean the same thing.  If your language has both upper & lower case, then you should put both here, since by default you probably don't care if they presed 'A' or 'a'.  (in the future, there will be an option to turn on/off this ability on the fly).  Tuxtyping generates the alphabet from this file, and it will use whatever letter you put first here.  So if you want upper case to be the default, then your file would look as follows:
+First you list the finger(s) that the player should use to press this letter, then a seperator |, then the character that the user can press. Each character is on its own line (this is changed from earlier versions of Tux Typing).  Thus, one line should be "0|A" and another line "0|a".  Tux Typing generates the list of allowed characters from this file.  This is not the same as your theme's alphabet, which should consist only of the characters that correspond to "letters".
 <p>
 <center><table bgcolor="#ccccff" width="75%" border=1 cellpadding=4><tr><td> 
 <pre>    cd data/themes/french
@@ -105,14 +103,20 @@
 </pre>
 Then I add the following lines to the keyboard.lst file:
 <pre>
-    0|Aa
-    3|Bb
-    2|Cc
-    2|Dd
-    2|Ee
-    3|Ff
+    0|A
+    0|a
+    3|B
+    3|b
+    2|C
+    2|c
+    2|D
+    2|d
+    2|E
+    2|e
+    3|F
+    3|f
 </pre>
-and so on for each letter including non A-Z characters if needed!
+and so on for each letter including non A-Z characters if needed! Tux Typing will use this list to determine which characters to pre-render (as well as for fingering hints), so be sure to include *all* characters needed for your theme, as omitted characters may not be able to be displayed. (I am trying to find a cross-platform way to query the OS as to what Unicode values can be typed by the user's current keyboard setup - if anyone has any ideas, please post to <a href="mailto:tuxmath-devel at lists.sourceforge.net">the dev list</a>).
 
 </td></tr></table></center>
 <p>
@@ -125,7 +129,7 @@
     mkdir words
 </pre>
 </td></tr></table></center>
-<p>Then all that is left to be done is to create these word lists (soon this will be able to do this from within the game!)   The first line of each wordlist should be the title of the wordlist.  After that, list all the words (one on each line).  
+<p>Then all that is left to be done is to create these word lists (soon this will be able to do this from within the game!)   The first line of each wordlist should be the title of the wordlist.  After that, list all the words (one on each line). If list contains any non-Western Unicode characters (i.e. Unicode value > 256), the file must be encoded as UTF-8.
 For instance <b>data/themes/french/words/words1.txt</b> is:
 <center><table bgcolor="#ccccff" width="75%" border=1 cellpadding=4><tr><td> 
 <pre>    Jesse's French Words
@@ -135,16 +139,15 @@
 </td></tr></table></center>
 <p>The only thing you need to remember is that each word can only be up to 8 characters long.  Also the game ignores ANYTHING after the first space.  If this is an issue, please let us know!
 </ol>
+
 <h3>The <B>MOST</b> important step.</h3>
-<p>You should send this file into the TuxTyping group so that it can be included in the distribution.  That way anyone who downloads Tuxtyping can use your theme without having to download your theme as well!  (Someone please do a REAL french theme!!!)
-<h3>FAQ - Frequently Asked Questions</h3>
-<p><b>Q:</b> Why do I need both menu.ttf and letters.ttf?
-<p><b>A:</b> There are times when you may need a different font for the menus and for the text that the player will have to type.  For instance if you create an American Sign Language (ASL) theme, you will probably want the letters font to be a truetype font that has the hands/fingers in the proper positions.
+<p>You should send this file into the Tux Typing group so that it can be included in the distribution.  That way anyone who downloads Tux Typing can use your theme without having to download your theme as well!
+
 <hr>
 <center><a href="http://tux4kids.alioth.debian.org">TuxTyping Homepage</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 <a href="http://alioth.debian.org/forum/?group_id=31080">TuxTyping Forums</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 <a href="mailto:dbruce at tampabay.rr.com">dbruce at tampabay.rr.com</a>
 <br><br>
-<font size="-2">Last edited June 16, 2007 but by no means fully up-to-date!</font>
+<font size="-2">Last edited Sept 04, 2007 but by no means fully up-to-date!</font>
 </center>
 </body>

Modified: tuxtype/trunk/tuxtype/funcs.h
===================================================================
--- tuxtype/trunk/tuxtype/funcs.h	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/funcs.h	2007-09-06 10:58:23 UTC (rev 229)
@@ -5,8 +5,13 @@
     begin                : Sat May 6 2000
     copyright            : (C) 2000 by Sam Hart
     email                : hart at geekcomix.com
- ***************************************************************************/
+ 
+  Modified by David Bruce
+  dbruce at tampabay.rr.com
+  2007
 
+***************************************************************************/
+
 /***************************************************************************
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -21,7 +26,7 @@
 
 
 /* In alphabet.c */
-SDL_Surface* BlackOutline(const unsigned char *t, const TTF_Font* font, const SDL_Color* c);
+SDL_Surface* BlackOutline(const unsigned char* t, const TTF_Font* font, const SDL_Color* c);
 SDL_Surface* BlackOutline_Unicode(const Uint16* t, const TTF_Font* font, const SDL_Color* c);
 
 #ifndef WIN32
@@ -30,6 +35,7 @@
 
 /* (still in alphabet.c:) */
 void ClearWordList(void);
+int ConvertFromUTF8(wchar_t* wide_word, const char* UTF8_word);
 void FreeLetters(void);
 void GenerateWordList(const char* wordFn);
 void GenCharListFromString(const char* UTF8_str);
@@ -39,6 +45,7 @@
 SDL_Surface* GetWhiteGlyph(wchar_t t);
 SDL_Surface* GetRedGlyph(wchar_t t);
 int LoadKeyboard(void);
+int GetFinger(wchar_t uni_char);
 int RenderLetters(const TTF_Font* letter_font);
 
 void UseAlphabet(void);
@@ -88,7 +95,7 @@
 
 
 /* In practice.c: */
-int Phrases(char* practice_phrase);
+int Phrases(wchar_t* practice_phrase);
 
 
 /* In scripting.c: */

Modified: tuxtype/trunk/tuxtype/globals.h
===================================================================
--- tuxtype/trunk/tuxtype/globals.h	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/globals.h	2007-09-06 10:58:23 UTC (rev 229)
@@ -206,7 +206,6 @@
 
 /* These need some work to support Unicode & i18n: */
 extern wchar_t ALPHABET[256];
-extern unsigned char FINGER[256][10];
 extern int ALPHABET_SIZE;
 
 
@@ -234,11 +233,3 @@
 };
 
 
-/* An individual item in the list of cached unicode characters that are rendered at   */
-/* the start of each game. The 'max_y' is stored so that the characters can be lined  */
-/* up properly even if their heights are different.                                   */
-typedef struct uni_glyph {
-  wchar_t unicode_value;
-  SDL_Surface* white_glyph;
-  SDL_Surface* red_glyph;
-} uni_glyph;

Modified: tuxtype/trunk/tuxtype/practice.c
===================================================================
--- tuxtype/trunk/tuxtype/practice.c	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/practice.c	2007-09-06 10:58:23 UTC (rev 229)
@@ -24,15 +24,15 @@
 static SDL_Surface* hand[11] = {NULL};
 static SDL_Rect hand_loc, letter_loc;
 static TTF_Font* font = NULL;
-static char phrase[255][FNLEN];
+static wchar_t phrase[255][FNLEN];
 
 static Mix_Chunk* wrong = NULL;
 
 /*local function prototypes: */
-static int get_phrase(const char* phr);
+static int get_phrase(const wchar_t* phr);
 static int practice_load_media(void);
 static void practice_unload_media(void);
-static void print_at(const char* pphrase, int wrap, int x, int y);
+static void print_at(const wchar_t* pphrase, int wrap, int x, int y);
 static void show(unsigned char t);
 
 
@@ -44,7 +44,7 @@
 
 
 /* FIXME this is not UTF-8/Unicode compatible */
-int Phrases(char* pphrase )
+int Phrases(wchar_t* pphrase )
 {
 
   /* TODO 
@@ -53,6 +53,7 @@
   * 
   */
 
+  /* FIXME make variable names more descriptive */
   Uint32 start = 0, a = 0;
   int quit = 0,
       i = 0,
@@ -63,8 +64,8 @@
       state = 0;
   int key[100] = {0};
   SDL_Rect dst, dst2, dst3, dst4, dst5;
-  char keytime[FNLEN],
-       totaltime[FNLEN];
+  char keytime[20],
+       totaltime[20];
   SDL_Surface* srfc = NULL;
 
 
@@ -81,24 +82,26 @@
 
   wp = get_phrase(pphrase);
 
-  if (!strncmp(phrase[0], "", 1))
-    strncpy(pphrase, phrase[0], 80);
+  if (!wcsncmp(phrase[0], (wchar_t*)"", 1))
+    wcsncpy(pphrase, phrase[0], 80);
 
-  if (!letters[65])
+  srfc = GetWhiteGlyph(65);
+
+  if (!srfc)
   {
-    fprintf(stderr, "Phrases() - letters[65] not defined - bailing out.\n");
+    fprintf(stderr, "Phrases() - GetWhiteGlyph(65) not defined - bailing out.\n");
     return 0;
   }
 
-  dst.x = 320 - (letters[65]->w/2);
+  dst.x = 320 - (srfc->w/2);
   dst.y = 100;
-  dst.w = letters[65]->w;
-  dst.h = letters[65]->h;
+  dst.w = srfc->w;
+  dst.h = srfc->h;
 
   dst2.x = 50;
   dst2.y = 400;
-  dst2.w = letters[65]->w;
-  dst2.h = letters[65]->h;
+  dst2.w = srfc->w;
+  dst2.h = srfc->h;
 
   dst3.x = 50;
   dst3.y = 400;
@@ -132,15 +135,12 @@
       case 1:
         if (SDL_GetTicks() - start > 500)
         {
-          for (i = 0; i < 10; i++)
-          { 
-            if (((int)pphrase[c] >= 0) /* Prevent bounds violation */
-              &&((int)pphrase[c] < 256) 
-              && FINGER[(int)pphrase[c]][i])
-            {
-              SDL_BlitSurface(hand[i], NULL, screen, &hand_loc);
-            }
-          }
+          /* Show finger hint, if available. Note that GetFinger() */
+          /* returns negative values on error and never returns a  */
+          /* value greater than 9.                                 */
+          int fing = GetFinger(pphrase[c]);
+          if (fing >= 0) 
+            SDL_BlitSurface(hand[fing], NULL, screen, &hand_loc);
           state = 2;
         }
         break;
@@ -158,20 +158,16 @@
        break;  
 
       case 4:
-        for (i = 0; i < 10; i++)
         {
-          if (((int)pphrase[c] >= 0) /* Prevent bounds violation */
-            &&((int)pphrase[c] < 256) /* This can't actually occur for type char */
-            && FINGER[(int)pphrase[c]][i])
-          {
-            SDL_BlitSurface(hand[i], NULL, screen, &hand_loc);
-          }
+          int fing = GetFinger(pphrase[c]);
+          if (fing >= 0) 
+            SDL_BlitSurface(hand[fing], NULL, screen, &hand_loc);
+          state = 11;
+          break;
         }
-        state = 11;
-        break;
 
       default:
-      state -= 2; // this is to make the flashing slower
+        state -= 2; // this is to make the flashing slower
     }
 
 
@@ -196,14 +192,6 @@
         }
         else
         {
-          /* Keep from segfaulting on unicode chars beyond 255 */
-          /* until practice mode is fixed:                     */
-          if (event.key.keysym.unicode > 255)
-          {
-            fprintf(stderr, "Practice mode cannot handle this unicode char\n");
-            continue;
-          }
-
           if (pphrase[c]==(char)event.key.keysym.unicode)
           {
             state = 0;
@@ -241,9 +229,11 @@
             }
 
 
-            if (c == (strlen(pphrase) - 1))
+            if (c == (wcslen(pphrase) - 1))
             {
-              print_at("Great!",6 ,275 ,200);
+              wchar_t buf[10];
+              ConvertFromUTF8(buf, _("Great!"));
+              print_at(buf,6 ,275 ,200);
               SDL_Flip(screen);
               SDL_Delay(2500);
               quit = 1;
@@ -286,7 +276,6 @@
 /************************************************************************/
 
 
-/* FIXME use RenderLetters(), etc */
 static int practice_load_media(void)
 {
   int i;	
@@ -300,6 +289,7 @@
   hands = LoadImage("hands/hands.png", IMG_ALPHA);
   bg = LoadImage("main_bkg.png", IMG_ALPHA);
   wrong = LoadSound("tock.wav");
+  font = LoadFont(settings.theme_font_name, 32);
 
   for (i = 0; i < 10; i++)
   {
@@ -313,7 +303,8 @@
   if (load_failed
     ||!hands
     ||!bg
-    ||!wrong)
+    ||!wrong
+    ||!font)
   {
     fprintf(stderr, "practice_load_media() - failed to load needed media \n");
     practice_unload_media;
@@ -321,26 +312,14 @@
   }
 
   /* Should be safe from here on out: */
-
   hand_loc.x = (screen->w/2) - (hand[0]->w/2);
   hand_loc.y = screen->h - (hand[0]->h);
   hand_loc.w = (hand[0]->w);
   hand_loc.h = (hand[0]->h);
 
   /* Now render letters for glyphs in alphabet: */
-  font = LoadFont(settings.theme_font_name, 32 );
-
-  /* FIXME below problem with i18n: */
-  let[1]=0;
-  for (i=1; i<255; i++)
-    /* until we fix or get rid of ALPHABET[], just render the whole range: */
-    if (ALPHABET[i])
-    {
-      let[0] = i;
-      letters[i] = BlackOutline(let, font, &white); 
-    }
-
-  TTF_CloseFont(font);
+  RenderLetters(font);
+  TTF_CloseFont(font);  /* Don't need it after rendering done */
   font = NULL;
 
   LOG("DONE - Loading practice media\n");
@@ -363,12 +342,7 @@
           SDL_FreeSurface(hand[i]);
           hand[i] = NULL;
         }
-	for (i = 1; i < 255; i++) 
-		if (ALPHABET[i])
-                { 
-		  SDL_FreeSurface(letters[i]);
-                  letters[i] = NULL;
-                }
+
 	Mix_FreeChunk(wrong);
 	wrong = NULL;
 }
@@ -392,7 +366,7 @@
 
 
 
-static int get_phrase(const char* phr)
+static int get_phrase(const wchar_t* phr)
 {
   int pc = 0;  // 'phrase count' (?)
   int pw[256] = { 0 };
@@ -400,7 +374,7 @@
   char fn[FNLEN];
 
   /* If we didn't receive a phrase get the first one from the file...*/
-  if (strncmp("", phr, 40) == 0)
+  if (wcsncmp((wchar_t*)"", phr, 40) == 0)
   {
     FILE* pf; /*   "phrase file"   */
     /* set the phrases directory/file */
@@ -433,53 +407,53 @@
   else
   {
     pc = 1;
-    strncpy(phrase[0], phr, 80);
+    wcsncpy(phrase[0], phr, 80);
   }
 
+  /* FIXME maybe should verify that all chars in phrase are 
+//   /* Need to generate glyphs for all the needed Unicode chars: */
+// 
+//   ResetCharList();
+//   /* 'A' (i.e. 65) always has to go into list because width used for layout */
+//   /* HACK also need chars for "Great!" because of congrats message - this   */
+//   /* obviously is not a general solution. Numerals also needed for timers.  */
+//   {
+//     char* let = "AGreat!0123456789.";
+//     GenCharListFromString(let);
+//   }
+// 
+// 
+//   /* Scan through all the phrases and put needed chars into list: */
+//   for (c = 0; c <= pc; c++)
+//     GenCharListFromString(phrase[c]);
+// 
+//   /* Now render letters for glyphs in list: */
+//   font = LoadFont(settings.theme_font_name, 32 );
+//   if (!font)
+//   {
+//     fprintf(stderr, "get_phrase() - could not load font\n");
+//     return 0;
+//   }
+// 
+//   RenderLetters(font);
+// 
+//   TTF_CloseFont(font);
+//   font = NULL;
 
-  /* Need to generate glyphs for all the needed Unicode chars: */
 
-  ResetCharList();
-  /* 'A' (i.e. 65) always has to go into list because width used for layout */
-  /* HACK also need chars for "Great!" because of congrats message - this   */
-  /* obviously is not a general solution. Numerals also needed for timers.  */
-  {
-    char* let = "AGreat!0123456789.";
-    GenCharListFromString(let);
-  }
-
-
-  /* Scan through all the phrases and put needed chars into list: */
-  for (c = 0; c <= pc; c++)
-    GenCharListFromString(phrase[c]);
-
-  /* Now render letters for glyphs in list: */
-  font = LoadFont(settings.theme_font_name, 32 );
-  if (!font)
-  {
-    fprintf(stderr, "get_phrase() - could not load font\n");
-    return 0;
-  }
-
-  RenderLetters(font);
-
-  TTF_CloseFont(font);
-  font = NULL;
-
-
   //Calculate and record pixel width of phrases
   {
     SDL_Surface* let = NULL;
     for (c = 0; c <= pc; c++)
     {
-      for(i = 0; i < strlen(phrase[c]); i++)
+      for(i = 0; i < wcslen(phrase[c]); i++)
       {
         let = GetWhiteGlyph((int)phrase[c][i]);
         if (let)  
           pw[c]+= let->w - 5;
         else
         {
-          fprintf(stderr, "get_phrase() - needed glyph not in letters[]\n");
+          fprintf(stderr, "get_phrase() - needed glyph not available\n");
           return;
         }
       }
@@ -493,7 +467,7 @@
     {
       if (c == 0)
       {
-        wp = strlen(phrase[c]);
+        wp = wcslen(phrase[c]);
         print_at(phrase[0], wp, 40, 10);
       }
     }
@@ -502,7 +476,7 @@
       z = 0;
       wp = 0;
 
-      for (i = 0; i < strlen(phrase[c]); i++)
+      for (i = 0; i < wcslen(phrase[c]); i++)
       {
         /* Should be safe (if no glyph, will have returned above) */
         z += GetWhiteGlyph((int)phrase[c][i])->w-5;
@@ -515,7 +489,7 @@
 
       for (i = wp; i >= 0; i--)
       {
-        if (strncmp(" ", &phrase[c][i], 1) == 0)
+        if (wcsncmp((wchar_t*)" ", &phrase[c][i], 1) == 0)
         {
           wp = i-1;
           break;
@@ -534,7 +508,7 @@
 
 
 
-static void print_at(const char *pphrase, int wrap, int x, int y)
+static void print_at(const wchar_t *pphrase, int wrap, int x, int y)
 {
   int z = 0;
   SDL_Surface* surf = NULL;
@@ -545,20 +519,20 @@
 
   LOG("Entering print_at()\n");
 
-  if (wrap >= strlen(pphrase)) // I think this means it fits on a single line
+  if (wrap >= wcslen(pphrase)) // I think this means it fits on a single line
   {
-    for (z = 0; z <strlen(pphrase); z++)
+    for (z = 0; z <wcslen(pphrase); z++)
     {
-      surf = GetWhiteGlyph((wchar_t)pphrase[z]);
+      surf = GetWhiteGlyph(pphrase[z]);
       if (surf)
       {
-        DEBUGCODE{printf("surf not NULL for %c\n", pphrase[z]);}
+        DEBUGCODE{printf("surf not NULL for %C\n", pphrase[z]);}
         SDL_BlitSurface(surf, NULL, screen, &letter_loc);
         letter_loc.x = (letter_loc.x + surf->w) - 5;
       }
       else
       {
-        fprintf(stderr, "print_at(): needed glyph for %c not found\n",
+        fprintf(stderr, "print_at(): needed glyph for %C not found\n",
                 pphrase[z]);
       }
     }
@@ -567,15 +541,15 @@
   {
     for (z = 0; z <= wrap; z++) 
     {
-      surf = GetWhiteGlyph((wchar_t)pphrase[z]);
+      surf = GetWhiteGlyph(pphrase[z]);
       if (surf)
       {
-        DEBUGCODE{printf("surf not NULL for %c\n", pphrase[z]);}
+        DEBUGCODE{printf("surf not NULL for %C\n", pphrase[z]);}
         SDL_BlitSurface(surf, NULL, screen, &letter_loc);
         letter_loc.x = (letter_loc.x + surf->w) - 5;      }
       else
       {
-        fprintf(stderr, "print_at(): needed glyph for %c not found\n",
+        fprintf(stderr, "print_at(): needed glyph for %C not found\n",
                 pphrase[z]);
       }
     }
@@ -585,9 +559,9 @@
     // - (letter_loc.h/4) to account for free space at top and bottom of rendered letters
     letter_loc.y = letter_loc.y + letter_loc.h - (letter_loc.h/4);
 
-    for (z = wrap + 2; z <strlen(pphrase); z++)
+    for (z = wrap + 2; z <wcslen(pphrase); z++)
     {
-      surf = GetWhiteGlyph((wchar_t)pphrase[z]);
+      surf = GetWhiteGlyph(pphrase[z]);
       if (surf)
       {
         DEBUGCODE{printf("surf not NULL for %c\n", pphrase[z]);}

Modified: tuxtype/trunk/tuxtype/theme.c
===================================================================
--- tuxtype/trunk/tuxtype/theme.c	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/theme.c	2007-09-06 10:58:23 UTC (rev 229)
@@ -22,7 +22,6 @@
 
 SDL_Surface* letters[255] = {NULL}; //get rid of this
 wchar_t ALPHABET[256];
-unsigned char FINGER[256][10] = {0};
 int ALPHABET_SIZE;
 
 

Modified: tuxtype/trunk/tuxtype/titlescreen.c
===================================================================
--- tuxtype/trunk/tuxtype/titlescreen.c	2007-09-04 15:46:57 UTC (rev 228)
+++ tuxtype/trunk/tuxtype/titlescreen.c	2007-09-06 10:58:23 UTC (rev 229)
@@ -99,7 +99,7 @@
   int redraw = 0;
   int key_menu = 1;
   int old_key_menu = 5;
-  char phrase[128];
+  wchar_t phrase[128];
 
 
   if (settings.sys_sound)
@@ -110,7 +110,10 @@
 
 
   /* FIXME phrase(s) should come from file */
-  strncpy( phrase, "Now is the time for all good men to come to the aid of their country.", 128);
+
+  ConvertFromUTF8(phrase, "Now is the time for all good men to come to the aid of their country.");
+
+//  wcscpy(phrase, "Now is the time for all good men to come to the aid of their country.");
   start = SDL_GetTicks();
 
 




More information about the Tux4kids-commits mailing list