Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: fonts/EAFont.h
- Revision:
- 7:6cf21b018420
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fonts/EAFont.h	Mon Nov 01 13:07:40 2010 +0000
@@ -0,0 +1,52 @@
+// Copyright 2010 Richard Parker
+
+#ifndef MBED_EAFONT_H
+#define MBED_EAFONT_H
+
+#include "mbed.h"
+
+#include <string>
+
+class EALCD;
+class EAFontCacheEntry;
+class EAImage;
+
+/**
+ * Class to handle the font for the EA LCD.
+ * @author Richard Parker
+ */
+class EAFont
+{
+public:
+    friend EALCD;
+    
+    struct EACharacter
+    {
+        unsigned char id;
+        unsigned char x;
+        unsigned char y;
+        unsigned char width;
+        unsigned char height;
+        unsigned char xOffset;
+        unsigned char yOffset;
+        unsigned char xAdvance;
+    };
+
+    EAFont();   
+    ~EAFont();
+       
+    EAFont(const EAFont& font);
+    EAFont& operator=(const EAFont& font);
+       
+    bool isValid() const;
+    bool load(const std::string& path);
+    
+//private:
+    EAFontCacheEntry* _entry;
+
+    bool _getCharacter(char c, EACharacter& detail);
+    bool _data(EAImage& image);
+    
+};
+
+#endif
\ No newline at end of file