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

📄 fonts.h

📁 LCD using AVR controller
💻 H
字号:
/*	Fonts.h
*
*	Bitmap fonts, stored in flash memory.
*
*	Define any/all of the following for access to the corresponding font:
*
*		                type           height   width
*		                ------------   ------   ------------
*		FONT_5x9		proportional     9      1-5 (most 5)
*		FONT_5x9_MONO	monospace        9      5
*		FONT_3x5		proportional     5      1-5 (most 3)
*
*	Revisions:
*		07-13-06	included in LCDSample project
*		07-11-06	version 1 in master library
*
*	Written by Cathy Saxton
*	robotics@idleloop.com
*/

#pragma once

class FONT
{
public:
	FONT(uchar dyFont, uchar cch, const uchar *papx, const uint *pmpchx);

	uchar DyFont() const	{ return m_dyFont; }

	/* returns first byte containing pixels for ch, and sets
	   *pf to mask its bit and *pdx to the width of the char
	   (pixels are ordered left to right, top to bottom) */
	const uchar *PbForCh(uchar ch, uchar *pf, uchar *pdx) const;

private:
	uchar DxForIch(uchar ich, uint *pcbit) const;

	uchar m_dyFont;		// height of each character
	uchar m_cch;		// num of chars for which we have bitmaps (starting with ' ')
	const uchar *m_papx;	// (flash) array of pixels
	const uint *m_pmpchx;	// (flash) array of starting column for each char
};

#ifdef FONT_5x9
extern FONT g_font5x9;
#endif
#ifdef FONT_5x9_MONO
extern FONT g_font5x9Mono;
#endif
#ifdef FONT_3x5
extern FONT g_font3x5;
#endif

⌨️ 快捷键说明

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