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.
Fork of SimpleGUI by
FastFont.h
00001 #ifndef SIMPLEGUI_FAST_FONT_H 00002 #define SIMPLEGUI_FAST_FONT_H 00003 00004 #include "mbed.h" // types 00005 #include "Font.h" 00006 00007 #define FAST_FONT_HEIGHT 0 00008 #define FAST_FONT_DATA_BYTES_PER_GLYPH 1 00009 #define FAST_FONT_FIRST_ASCII 2 00010 #define FAST_FONT_LAST_ASCII 3 00011 #define FAST_FONT_PROPORTIONAL 4 00012 #define FAST_FONT_DATA 5 00013 00014 class FastFont : public Font 00015 { 00016 00017 public: 00018 00019 FastFont(uint8_t* fastFont); 00020 00021 virtual uint8_t firstAscii(); 00022 virtual uint8_t lastAscii(); 00023 /** 00024 * The unzoomed width of the character 00025 **/ 00026 virtual uint8_t widthOf(char c); 00027 virtual uint8_t zoomedWidthOf(char c); 00028 /** 00029 * The unzoomed height of a character 00030 **/ 00031 virtual uint8_t height(); 00032 virtual uint8_t zoomedHeight(); 00033 virtual bool isProportional(); 00034 00035 /********************************* 00036 * Methods specific to this class 00037 *********************************/ 00038 uint8_t totalBytesPerGlyph(); 00039 uint8_t dataBytesPerGlyph(); 00040 uint8_t bytesPerRow(); 00041 uint8_t* glyph(char c); 00042 00043 00044 private: 00045 00046 uint8_t* _font; 00047 uint8_t _totalBytesPerGlyph; 00048 uint8_t _bytesPerRow; 00049 }; 00050 00051 00052 #endif
Generated on Tue Jul 12 2022 22:27:14 by
