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

📄 mgfont.h

📁 monqueror一个很具有参考价值的源玛
💻 H
字号:
#ifndef		_MGFONT_H_#define		_MGFONT_H_class MGFont{public:    enum CharSet   { ISO_8859_1,  Latin1 = ISO_8859_1, AnyCharSet,		     ISO_8859_2,  Latin2 = ISO_8859_2,		     ISO_8859_3,  Latin3 = ISO_8859_3,		     ISO_8859_4,  Latin4 = ISO_8859_4,		     ISO_8859_5,		     ISO_8859_6,		     ISO_8859_7,		     ISO_8859_8,		     ISO_8859_9,  Latin5 = ISO_8859_9,		     ISO_8859_10, Latin6 = ISO_8859_10,		     ISO_8859_11, TIS620 = ISO_8859_11,		     ISO_8859_12,		     ISO_8859_13, Latin7 = ISO_8859_13,		     ISO_8859_14, Latin8 = ISO_8859_14,		     ISO_8859_15, Latin9 = ISO_8859_15,		     KOI8R,		     Set_Ja, Set_1 = Set_Ja,		     Set_Ko,		     Set_Th_TH,		     Set_Zh,		     Set_Zh_TW,		     Set_N = Set_Zh_TW,		     Unicode,		     /* The following will need to be re-ordered later,			since we accidentally left no room below "Unicode".		        (For binary-compatibility that cannot change yet).			The above will be obsoleted and a same-named list			added below.		     */		     Set_GBK,		     Set_Big5,		     /* The following are font-specific encodings that			we shouldn't need in a perfect world.		     */		     // 8-bit fonts		     JIS_X_0201 = 0xa0,		     // 16-bit fonts		     JIS_X_0208 = 0xc0, Enc16 = JIS_X_0208,		     KSC_5601,		     GB_2312,		     Big5,		     TSCII,		     KOI8U    };	MGFont();	MGFont (const MGString& family, int pointSize = 12,			int weight = MG::Normal, bool italic = false, CharSet charset = GB_2312);	~MGFont();	bool operator==( const MGFont& f ) const;	bool operator!=( const MGFont& f ) const;	MGFont& operator=( const MGFont& f );	int pointSize() const;	void setPointSize( int );	bool italic() const;	void setItalic( bool );	int weight() const;	void setWeight( int );    CharSet	charSet () const;    void setCharSet (CharSet);    QString	family () const;	void setFamily( const MGString& );#if( _CURRENT_PLATFORM == _PLATFORM_MINIGUI )	static PLOGFONT CreateFont (const MGString& family, int ps, int weight, bool italic, CharSet charset);	static PLOGFONT CreateFont (const MGFont& font);#endifprotected:	friend class MGPainter;	friend class MGFontMetrics;#if( _CURRENT_PLATFORM == _PLATFORM_MINIGUI )	int m_weight;	int m_pointSize;	bool m_italic;    MGString m_family;    CharSet m_charset;#endif};#endif

⌨️ 快捷键说明

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