📄 chscharset.cpp
字号:
#include "gos.h"
#include "chscharset.h"
extern const FONTFACE g_fntChs;
DWORD CChsCharSet::GetCharType(DWORD nCode)
{
if(nCode>255)
return CHARTYPE_WORDBREAK|CHARTYPE_DBLBYTES;
return CCharSet::GetCharType(nCode);
}
DWORD CChsCharSet::ParseText(LPCTSTR& pText)
{
DWORD nCode=BYTE(*pText++);
if(nCode>128)
{
nCode<<=8;
nCode|=BYTE(*pText++);
return nCode;
}
return nCode;
}
DWORD CChsCharSet::Translate(DWORD nCode,BOOL bToSystem)
{
return nCode;
}
CChsFontFace::CChsFontFace()
{
m_ff=g_fntChs;
m_pFF=new CFontFace();
}
CChsFontFace::~CChsFontFace()
{
delete m_pFF;
}
PBYTE CChsFontFace::FindChar(DWORD nCharCode)
{
if(nCharCode>255)
{
nCharCode=((nCharCode>>8)-0xa1)*94+(nCharCode&0xff)-0xa1;
return CFontFace::FindChar(nCharCode);
}
return m_pFF->FindChar(nCharCode);
}
void CChsFontFace::DrawFont(FFDRAWARG& pv)
{
if(pv.nCharCode>255)
CFontFace::DrawFont(pv);
else
m_pFF->DrawFont(pv);
}
int CChsFontFace::GetCharWidth(DWORD nCharCode,int nSize)
{
if(nCharCode>255)
return CFontFace::GetCharWidth(nCharCode,nSize);
return m_pFF->GetCharWidth(nCharCode,nSize);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -