Richard Parker / EALCD
Revision:
6:4fe6f365cbeb
Parent:
3:24fbf4dbd7e5
--- a/graphics/EAFont.cpp	Tue Apr 27 23:13:21 2010 +0000
+++ b/graphics/EAFont.cpp	Thu May 06 23:32:14 2010 +0000
@@ -3,7 +3,6 @@
 #include "mbed.h"
 #include "EAFont.h"
 
-#include "../widgets/EAImage.h"
 #include "../screen/EALCD.h"
 
 EAFont::EAFont()
@@ -11,6 +10,8 @@
     _chars(NULL),
     _noChars(0)
 {
+    _img.setCached(true);
+    _img.setMask(true);
 }
 
 EAFont::~EAFont()
@@ -124,12 +125,15 @@
         _chars[i].xAdvance = v;
     }
     
-    fclose(fp);       
+    fclose(fp);
+    
+    // Now load the cached image.
+    _img.load(_path);
    
     return true;    
 }
 
-bool EAFont::getCharacter(char c, EACharacter& detail)
+bool EAFont::_getCharacter(char c, EACharacter& detail)
 {
     for (int i = 0; i < _noChars; i++)
     {