symbian字体使用方法汇总
来源:互联网 发布:系统自动还原软件 编辑:程序博客网 时间:2024/05/16 05:38
作者:算-法无极 文章来源:blog.csdn.net/windcao
获取固定比例的字体。
先看看代码,由于标签的原有有些内容有误,
gc.DrawText(_L("SymbolFont /x671D/x5916/x5927/x8857"),TPoint(x,baseH));
被显示成了 gc.DrawText(_L("SymbolFont g1DY16Y27ˆ57"),TPoint(x,baseH));
实际上/x671D/x5916/x5927/x8857是汉字 朝外大街。
获取固定大小的字体:
void CTestView::Draw( const TRect& /*aRect*/ ) cons
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
TRect drawRect( Rect());
// Clears the screen
gc.Clear( drawRect );
TInt baseH=0;
TInt incH=10;
TInt x=0;
const CFont* myFont=NULL;
//--------------------------拉丁字体
myFont=LatinPlain12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinPlain12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold12"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold13();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold13 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold13"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold16();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold16 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold17();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinBold17 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold19();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinBold19 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=NumberPlain5();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("1234567890"),TPoint(x,baseH));
gc.DiscardFont();
myFont=ClockBold30();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("ClockBold30 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinClock14();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinClock14 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
//---------------------中文字体
myFont=ApacPlain16();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
// gc.DrawText(_L("ApacPlain16 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("ApacPlain16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=ApacPlain12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
// gc.DrawText(_L("ApacPlain12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("ApacPlain12"),TPoint(x,baseH));
gc.DiscardFont();
}
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
TRect drawRect( Rect());
// Clears the screen
gc.Clear( drawRect );
TInt baseH=0;
TInt incH=10;
TInt x=0;
const CFont* myFont=NULL;
//--------------------------拉丁字体
myFont=LatinPlain12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinPlain12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold12"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold13();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold13 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold13"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold16();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
//gc.DrawText(_L("LatinBold16 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("LatinBold16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold17();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinBold17 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinBold19();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinBold19 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=NumberPlain5();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("1234567890"),TPoint(x,baseH));
gc.DiscardFont();
myFont=ClockBold30();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("ClockBold30 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=LatinClock14();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LatinClock14 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
//---------------------中文字体
myFont=ApacPlain16();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
// gc.DrawText(_L("ApacPlain16 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("ApacPlain16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=ApacPlain12();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
// gc.DrawText(_L("ApacPlain12 g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DrawText(_L("ApacPlain12"),TPoint(x,baseH));
gc.DiscardFont();
}
void CTest2View::Draw( const TRect& /*aRect*/ ) const
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
TRect drawRect( Rect());
// Clears the screen
gc.Clear( drawRect );
TInt baseH=0;
TInt incH=10;
TInt x=0;
const CFont* myFont=NULL;
myFont=CEikonEnv::Static()->TitleFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels() +1;
gc.DrawText(_L("TitleFont g1DY16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->NormalFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("NormalFont g1DY16Y27"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->AnnotationFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("AnnotationFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->LegendFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LegendFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->SymbolFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("SymbolFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->DenseFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("DenseFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
}
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
TRect drawRect( Rect());
// Clears the screen
gc.Clear( drawRect );
TInt baseH=0;
TInt incH=10;
TInt x=0;
const CFont* myFont=NULL;
myFont=CEikonEnv::Static()->TitleFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels() +1;
gc.DrawText(_L("TitleFont g1DY16"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->NormalFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("NormalFont g1DY16Y27"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->AnnotationFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("AnnotationFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->LegendFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("LegendFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->SymbolFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("SymbolFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
myFont=CEikonEnv::Static()->DenseFont();
gc.UseFont( myFont );
baseH+=myFont->HeightInPixels()+1;
gc.DrawText(_L("DenseFont g1DY16Y27ˆ57"),TPoint(x,baseH));
gc.DiscardFont();
}
下面是各个版本的s60 平台上面模拟器的截图。
- symbian字体使用方法汇总
- symbian字体使用方法汇总
- symbian字体使用方法汇总
- symbian字体使用方法汇总
- symbian字体使用方法汇总
- symbian字体使用方法汇总
- Symbian 字体汇总
- symbian皮肤使用方法汇总
- symbian系统皮肤(theme)使用方法汇总
- symbian系统皮肤(theme)使用方法汇总
- Symbian系统字体,全局变量
- Symbian系统字体,全局变量
- symbian中的字体
- Symbian设置CEikEdwin字体
- Symbian设置CEikEdwin字体
- symbian 字体设置
- Symbian 字体小结
- Symbian设置CEikEdwin字体
- 如何选择描述符
- Delphi浏览文件夹
- window右键新建中添加项目
- 再次去黄山,o(∩_∩)o...哈哈
- VC 纯资源DLL制作及调用
- symbian字体使用方法汇总
- 相遇是一种魔咒
- js反选 全选 多选框 兼容ie和firefox版本
- ASP.NET 内容管理系统 CMS 的体系结构
- 房价 美国次按风暴,买房的可以看看
- Point 1. 从TextBox中获取数字,要将汉字或者字符去掉:
- Winform与WPF对话框(MessageBox, Dialog)之比较
- 在dojo中使用JSON-RPC
- 微软cube的增量更新处理