⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fonts.c

📁 LPC213x Driver For T6963 based Graphic LCD
💻 C
📖 第 1 页 / 共 5 页
字号:
/***************************************************************************
 *                                                                         *
 *	 FILE: FONTS.C                                                         *
 *   LCD Display Controller font set. Supports five fonts that are         *
 *   defined in bit map tables in this source file. The font tables in     *
 *   this file were derived from a conversion program called FontGen       *
 *   by Bahri Okuroglu - bahrio@yahoo.com.								   *
 *                                                                         *
 *   Copyright (C) 2003 by Carousel Design Solutions                       *
 *                                                                         *
 *									Written by:                            *
 *									Michael J. Karas                       *
 *									Carousel Design Solutions              *
 *									4217 Grimes Ave South                  *
 *									Edina MN 55416                         *
 *									(952) 929-7537                         *
 *                                                                         *
 ***************************************************************************/

/*
Ported from Original C51 code to ARM By 
Mukund Deshmukh.
email betacomp_ngp@sancharnet.in
http://betacomp.com
Dt 07.07.2006

*/



#include <stdarg.h>
#include "fonts.h"
/* definition tables for fonts as follows:                         */
/* all fonts include 96 glyphs from 0x20 to 0x7F that are in ASCII order */

struct FONT_DEF fonts[FONT_COUNT] = {
#ifdef EN_FIVE_DOT
                   {1,  7, five_dot_glyph_table, 0, five_dot_width_table,' ','~','.'},
#endif

#ifdef EN_SIX_DOT
                   {2,  8, six_dot_glyph_table, 0, six_dot_width_table,' ','~','.'},
#endif

#ifdef EN_SEVEN_DOT
                   {2,  8, seven_dot_glyph_table, 0, seven_dot_width_table,' ','~','.'},
#endif

#ifdef EN_NINE_DOT
                   {1, 12, nine_dot_glyph_table, 8, NULL,' ','~','.'},
#endif

#ifdef EN_TEN_DOT
                   {2, 12, ten_dot_glyph_table, 9, NULL,' ','~','.'},
#endif

#ifdef EN_FIFTEEN_DOT
                   {3, 18, fifteen_dot_glyph_table, 0, fifteen_dot_width_table,' ','~','.'},
#endif

#ifdef EN_EIGHTEEN_DOT
                   {3, 18, eighteen_dot_glyph_table, 0, eighteen_dot_width_table,' ','9','.'},
#endif
				  };

#ifdef EN_FIVE_DOT
const unsigned char five_dot_glyph_table[] = {
		/* ' ' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		
		/* '!' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		
		/* '"' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xA0, 	/*  [* * ]  */
		0xA0, 	/*  [* * ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		
		/* '#' charwidth: 8 */
		0x00, 	/*  [        ]  */
		0x14, 	/*  [   * *  ]  */
		0x7E, 	/*  [ ****** ]  */
		0x28, 	/*  [  * *   ]  */
		0xFC, 	/*  [******  ]  */
		0x50, 	/*  [ * *    ]  */
		0x00, 	/*  [        ]  */
		
		/* '$' charwidth: 4 */
		0x40, 	/*  [ *  ]  */
		0x60, 	/*  [ ** ]  */
		0x80, 	/*  [*   ]  */
		0x40, 	/*  [ *  ]  */
		0x20, 	/*  [  * ]  */
		0xC0, 	/*  [**  ]  */
		0x40, 	/*  [ *  ]  */
		
		/* '%' charwidth: 8 */
		0x00, 	/*  [        ]  */
		0x64, 	/*  [ **  *  ]  */
		0xA8, 	/*  [* * *   ]  */
		0xD6, 	/*  [** * ** ]  */
		0x2A, 	/*  [  * * * ]  */
		0x4C, 	/*  [ *  **  ]  */
		0x00, 	/*  [        ]  */
		
		/* '&' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x60, 	/*  [ **   ]  */
		0x90, 	/*  [*  *  ]  */
		0x40, 	/*  [ *    ]  */
		0x98, 	/*  [*  ** ]  */
		0x60, 	/*  [ **   ]  */
		0x00, 	/*  [      ]  */
		
		/* ''' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		
		/* '(' charwidth: 3 */
		0x40, 	/*  [ * ]  */
		0x80, 	/*  [*  ]  */
		0x80, 	/*  [*  ]  */
		0x80, 	/*  [*  ]  */
		0x80, 	/*  [*  ]  */
		0x80, 	/*  [*  ]  */
		0x40, 	/*  [ * ]  */
		
		/* ')' charwidth: 3 */
		0x80, 	/*  [*  ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x80, 	/*  [*  ]  */
		
		/* '*' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x50, 	/*  [ * *  ]  */
		0x20, 	/*  [  *   ]  */
		0xF8, 	/*  [***** ]  */
		0x20, 	/*  [  *   ]  */
		0x50, 	/*  [ * *  ]  */
		0x00, 	/*  [      ]  */
		
		/* '+' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x20, 	/*  [  *   ]  */
		0x20, 	/*  [  *   ]  */
		0xF8, 	/*  [***** ]  */
		0x20, 	/*  [  *   ]  */
		0x20, 	/*  [  *   ]  */
		0x00, 	/*  [      ]  */
		
		/* ',' charwidth: 3 */
		0x00, 	/*  [   ]  */
		0x00, 	/*  [   ]  */
		0x00, 	/*  [   ]  */
		0x00, 	/*  [   ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x80, 	/*  [*  ]  */
		
		/* '-' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		0xE0, 	/*  [*** ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		0x00, 	/*  [    ]  */
		
		/* '.' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		
		/* '/' charwidth: 4 */
		0x20, 	/*  [  * ]  */
		0x20, 	/*  [  * ]  */
		0x40, 	/*  [ *  ]  */
		0x40, 	/*  [ *  ]  */
		0x80, 	/*  [*   ]  */
		0x80, 	/*  [*   ]  */
		0x00, 	/*  [    ]  */
		
		/* '0' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* '1' charwidth: 3 */
		0x00, 	/*  [   ]  */
		0x40, 	/*  [ * ]  */
		0xC0, 	/*  [** ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x00, 	/*  [   ]  */
		
		/* '2' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x20, 	/*  [  *  ]  */
		0x40, 	/*  [ *   ]  */
		0xF0, 	/*  [**** ]  */
		0x00, 	/*  [     ]  */
		
		/* '3' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x20, 	/*  [  *  ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* '4' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x20, 	/*  [  *  ]  */
		0x60, 	/*  [ **  ]  */
		0xA0, 	/*  [* *  ]  */
		0xF0, 	/*  [**** ]  */
		0x20, 	/*  [  *  ]  */
		0x00, 	/*  [     ]  */
		
		/* '5' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xE0, 	/*  [*** ]  */
		0x80, 	/*  [*   ]  */
		0xE0, 	/*  [*** ]  */
		0x20, 	/*  [  * ]  */
		0xC0, 	/*  [**  ]  */
		0x00, 	/*  [    ]  */
		
		/* '6' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x20, 	/*  [  *  ]  */
		0x40, 	/*  [ *   ]  */
		0xE0, 	/*  [***  ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* '7' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xE0, 	/*  [*** ]  */
		0x20, 	/*  [  * ]  */
		0x40, 	/*  [ *  ]  */
		0x40, 	/*  [ *  ]  */
		0x40, 	/*  [ *  ]  */
		0x00, 	/*  [    ]  */
		
		/* '8' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* '9' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x70, 	/*  [ *** ]  */
		0x20, 	/*  [  *  ]  */
		0x40, 	/*  [ *   ]  */
		0x00, 	/*  [     ]  */
		
		/* ':' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		
		/* ';' charwidth: 3 */
		0x00, 	/*  [   ]  */
		0x00, 	/*  [   ]  */
		0x40, 	/*  [ * ]  */
		0x00, 	/*  [   ]  */
		0x40, 	/*  [ * ]  */
		0x40, 	/*  [ * ]  */
		0x80, 	/*  [*  ]  */
		
		/* '<' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0x20, 	/*  [  * ]  */
		0x40, 	/*  [ *  ]  */
		0x80, 	/*  [*   ]  */
		0x40, 	/*  [ *  ]  */
		0x20, 	/*  [  * ]  */
		0x00, 	/*  [    ]  */
		
		/* '=' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x00, 	/*  [     ]  */
		0xF0, 	/*  [**** ]  */
		0x00, 	/*  [     ]  */
		0xF0, 	/*  [**** ]  */
		0x00, 	/*  [     ]  */
		0x00, 	/*  [     ]  */
		
		/* '>' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0x80, 	/*  [*   ]  */
		0x40, 	/*  [ *  ]  */
		0x20, 	/*  [  * ]  */
		0x40, 	/*  [ *  ]  */
		0x80, 	/*  [*   ]  */
		0x00, 	/*  [    ]  */
		
		/* '?' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xC0, 	/*  [**  ]  */
		0x20, 	/*  [  * ]  */
		0x40, 	/*  [ *  ]  */
		0x00, 	/*  [    ]  */
		0x40, 	/*  [ *  ]  */
		0x00, 	/*  [    ]  */
		
		/* '@' charwidth: 8 */
		0x38, 	/*  [  ***   ]  */
		0x44, 	/*  [ *   *  ]  */
		0x9A, 	/*  [*  ** * ]  */
		0xAA, 	/*  [* * * * ]  */
		0xB4, 	/*  [* ** *  ]  */
		0x40, 	/*  [ *      ]  */
		0x30, 	/*  [  **    ]  */
		
		/* 'A' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x20, 	/*  [  *   ]  */
		0x20, 	/*  [  *   ]  */
		0x50, 	/*  [ * *  ]  */
		0x70, 	/*  [ ***  ]  */
		0x88, 	/*  [*   * ]  */
		0x00, 	/*  [      ]  */
		
		/* 'B' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0xE0, 	/*  [***  ]  */
		0x90, 	/*  [*  * ]  */
		0xE0, 	/*  [***  ]  */
		0x90, 	/*  [*  * ]  */
		0xE0, 	/*  [***  ]  */
		0x00, 	/*  [     ]  */
		
		/* 'C' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x80, 	/*  [*    ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* 'D' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0xE0, 	/*  [***  ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0xE0, 	/*  [***  ]  */
		0x00, 	/*  [     ]  */
		
		/* 'E' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xE0, 	/*  [*** ]  */
		0x80, 	/*  [*   ]  */
		0xE0, 	/*  [*** ]  */
		0x80, 	/*  [*   ]  */
		0xE0, 	/*  [*** ]  */
		0x00, 	/*  [    ]  */
		
		/* 'F' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0xE0, 	/*  [*** ]  */
		0x80, 	/*  [*   ]  */
		0xE0, 	/*  [*** ]  */
		0x80, 	/*  [*   ]  */
		0x80, 	/*  [*   ]  */
		0x00, 	/*  [    ]  */
		
		/* 'G' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x70, 	/*  [ *** ]  */
		0x80, 	/*  [*    ]  */
		0xB0, 	/*  [* ** ]  */
		0x90, 	/*  [*  * ]  */
		0x70, 	/*  [ *** ]  */
		0x00, 	/*  [     ]  */
		
		/* 'H' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0xF0, 	/*  [**** ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x00, 	/*  [     ]  */
		
		/* 'I' charwidth: 2 */
		0x00, 	/*  [  ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x80, 	/*  [* ]  */
		0x00, 	/*  [  ]  */
		
		/* 'J' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x10, 	/*  [   * ]  */
		0x10, 	/*  [   * ]  */
		0x10, 	/*  [   * ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* 'K' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x90, 	/*  [*  * ]  */
		0xA0, 	/*  [* *  ]  */
		0xC0, 	/*  [**   ]  */
		0xA0, 	/*  [* *  ]  */
		0x90, 	/*  [*  * ]  */
		0x00, 	/*  [     ]  */
		
		/* 'L' charwidth: 4 */
		0x00, 	/*  [    ]  */
		0x80, 	/*  [*   ]  */
		0x80, 	/*  [*   ]  */
		0x80, 	/*  [*   ]  */
		0x80, 	/*  [*   ]  */
		0xE0, 	/*  [*** ]  */
		0x00, 	/*  [    ]  */
		
		/* 'M' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x88, 	/*  [*   * ]  */
		0xD8, 	/*  [** ** ]  */
		0xA8, 	/*  [* * * ]  */
		0x88, 	/*  [*   * ]  */
		0x88, 	/*  [*   * ]  */
		0x00, 	/*  [      ]  */
		
		/* 'N' charwidth: 6 */
		0x00, 	/*  [      ]  */
		0x88, 	/*  [*   * ]  */
		0xC8, 	/*  [**  * ]  */
		0xA8, 	/*  [* * * ]  */
		0x98, 	/*  [*  ** ]  */
		0x88, 	/*  [*   * ]  */
		0x00, 	/*  [      ]  */
		
		/* 'O' charwidth: 5 */
		0x00, 	/*  [     ]  */
		0x60, 	/*  [ **  ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x90, 	/*  [*  * ]  */
		0x60, 	/*  [ **  ]  */
		0x00, 	/*  [     ]  */
		
		/* 'P' charwidth: 5 */
		0x00, 	/*  [     ]  */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -