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.
Dependencies: BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src
Diff: FontX/FontX.h
- Revision:
- 13:811a5c5b3fd6
- Child:
- 14:2044ad5cd3fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FontX/FontX.h Sun Jan 31 17:45:50 2016 +0000
@@ -0,0 +1,44 @@
+#ifndef __FontX_h
+#define __FontX_h
+
+#include "mbed.h"
+
+#define uint_8 unsigned char
+#define int8 char
+#define int16 short
+
+typedef struct
+{
+ unsigned int8 Charwidth;
+ unsigned int8 Charheight;
+ unsigned int16 Offset;
+
+} FONT_CHAR_INFO;
+
+typedef struct
+{
+ char StartCharacter;
+ char EndCharacter;
+ const FONT_CHAR_INFO *Descriptors;
+ const unsigned int8 *Bitmaps;
+
+} FONT_INFO;
+
+#include "Candara18pt.h"
+#include "Segoe18pt.h"
+
+typedef enum
+{
+ ALIGN_CENTER,
+ ALIGN_RIGHT,
+ ALIGN_LEFT
+
+} FONTX_ALIGNMENT_ENUM;
+
+uint32_t FontX_GetLength(char *Text,const FONT_INFO *pFont);
+uint32_t FontX_GetHeight(const FONT_INFO *pFont);
+void FontX_DisplayStringAt(uint16_t Xpos,uint16_t Ypos,uint16_t width,char *Text,FONTX_ALIGNMENT_ENUM Alignment,const FONT_INFO *pFont,uint32_t colorText,uint32_t colorBack);
+uint32_t FontX_DisplayChar(uint16_t Xpos,uint16_t Ypos,char Ascii,const FONT_INFO *pFont,uint32_t colorText,uint32_t colorBack);
+
+#endif
+