windcao发表与:http://blog.csdn.net/windcao/archive/2007/09/05/1773637.aspx

先看看代码,由于标签的原有有些内容有误,
 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*/ ) 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=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();
}

下面是各个版本的s60 平台上面模拟器的截图。

symbian字体使用方法汇总相关推荐

  1. 解除Word文档保护方法汇总

    解除 Word 文档保护方法汇总 Word 的文档保护分为打开保护和修改保护,现在我们来讨论如何解除修改保护.前两种方法是我从网上找到的,第三种是自己想的,感觉超级简单实用. 版本 :Office 2 ...

  2. wordpress空间访问gravatar头像方法汇总

    来自:http://www.cazir.com/1318.html 所周知Gravatar头像服务已经被彻底屏蔽了,国内没办法正常访问,是有些通过缓存的方法来获取头像,但是国内的大多数使用的网站都出现 ...

  3. 全方位WordPress添加水印方法汇总

    原文出处:全方位WordPress添加水印方法汇总 大家好,我是雷锋哥.今天给大家讲讲 WordPress 给图片加水印的插件介绍和方法,给图片添加水印其实没什么技术含量,图片添加水印一方面是为了预防 ...

  4. TagCanvas文字云属性+方法汇总

    TagCanvas文字云属性+方法汇总 前言 导入 使用 可用属性 js方法 jq方法 前言 甲方爸爸要一个文字旋转的炫酷功能,无意间发现了这个插件,用起来还可以就是感觉扩展性不强,由于网上的资料太少 ...

  5. 用python下载文件的若干种方法汇总

    压缩文件可以直接放到下载器里面下载的 you-get 连接 下载任意文件 重点 用python下载文件的若干种方法汇总 写文章 用python下载文件的若干种方法汇总 zhangqibot发表于Met ...

  6. 二、深度学习数据增强方法汇总

    深度学习模型训练数据增强方法汇总 一.随机裁剪 二.RGB-->BGR通道互换 三.仿射变换(缩放) 三.随机旋转 四.对比度调整 五.随机抠图 六.bound box 中心点随机抠图 七.随机 ...

  7. 特征点匹配+特征检测方法汇总

    特征点匹配+特征检测方法汇总 特征提取与匹配---SURF:SIFT:ORB:FAST:Harris角点 匹配方法 匹配函数 1. OpenCV提供了两种Matching方式: • Brute-for ...

  8. 统计计量 | 统计学中常用的数据分析方法汇总

    来源:数据Seminar本文约10500字,建议阅读15+分钟 统计学中常用的数据分析方法汇总. Part1描述统计 描述统计是通过图表或数学方法,对数据资料进行整理.分析,并对数据的分布状态.数字特 ...

  9. js如何操作表格(常用属性方法汇总)

    js如何操作表格(常用属性方法汇总) 一.总结 一句话总结: 二.表格相关的属性和方法 1.1 Table 对象集合 cells[] 返回包含表格中所有单元格的一个数组. 语法:tableObject ...

最新文章

  1. 字符串缓冲区太小怎么解决_epoll的两种模式 ET和LT printf的缓冲区问题 边缘非阻塞模式...
  2. 新手学习DaVinci笔记一:查找资料篇
  3. 现代的缓存设计方案:Window-TinyLFU
  4. python200行代码_如何用200行Python代码“换脸”
  5. Bjarne Stroustrup语录[C++经验]
  6. 5种样式实现div容器中三图摆放实例对比说明
  7. 汇编@data_汇编语言(4)--内存段
  8. 利用Hibernate进行数据库的增删改查
  9. 《Java 8 实战》 学习笔记一(行为参数化)
  10. c语言编程屏保动画实例,用C语言自己动手制作炫彩电脑屏保
  11. php易语言互交_易语言php编码转换 易语言与php数据交互
  12. 基于Matlab的海洋监视雷达检测仿真(附源码)
  13. 基于QT的IM(jabber)库和客户端
  14. deepin系统引导_Deepin系统安装教程
  15. Error occurred when evaluating apply
  16. android计算器退格键,请问下计算器的退格键是哪个键?
  17. 计算机学院机考,东华大学计算机学院研究生复试上机考真题.doc
  18. ce修改面板属性_用CE脚本进行FGO一键修改局内属性
  19. android大图、高清图片处理
  20. hub设备_是快充能手 更是HUB拓展管家 你的移动电源何必仅仅只能充电

热门文章

  1. MongoDB建模场景
  2. 中小学教师资格考试报名照片尺寸要求及审核失败原因详解
  3. android 9.0系统下载地址,安卓9.0发布(有下载地址)!你会去用吗?
  4. 北京信息科技大学第十一届程序设计竞赛(重现赛)F kotori和n皇后
  5. Anaconda3安装教程记录
  6. 群晖NAS搭建Docker私服
  7. linux虚拟机文件操作命令
  8. cip数据(如何查cip数据)
  9. java memory copy_Java Unsafe.copyMemory java.lang.IllegalArgumentException
  10. 计算机软件工作时间,电脑上使用的工作日程表软件用哪个?