OpenGLES---加载文字
来源:互联网 发布:淘宝店铺如何暂时关闭 编辑:程序博客网 时间:2024/06/06 00:27
用的是这个https://www.freetype.org/
{1:加载库文件2:freetype简单用法}
{1:加载库文件\depends\lib\windows\x86freetype.lib 库文件depends\includefreetype 文件夹ft2build.h 头文件}
{2:freetype简单用法1:初始化字体库FT_Init_FreeType( &_library );2:装载一个字体//FT_New_Face(FT_Library library,const char* filepathname,FT_Long face_index,FT_Face *aface); FT_Error error = FT_New_Memory_Face((FT_Library)_library,(const FT_Byte *)_fontBuffer,length,0,(FT_Face*)&_face);3:设置当前象素尺寸(设置字体大小)FT_Set_Char_Size((FT_Face)_face, ftSize, 0, 72, 72); //FT_Set_Pixel_Sizes( FT_Face face,FT_UInt pixel_width,FT_UInt pixel_height );4:装载一个字形图像FT_UInt index= FT_Get_Char_Index(_face, ch );// 得到字符的索引FT_Load_Glyph( _face,index, FT_LOAD_DEFAULT );//加载一个字符FT_Glyph glyph;FT_Get_Glyph( FT_Face(_face)->glyph, &glyph );FT_Glyph_To_Bitmap( &glyph, ft_render_mode_normal, 0, 1 ); //渲染字符ft_render_mode_normal 渲染为256级灰度图(默认)ft_render_mode_mono 是黑白位图}
源码地址
http://pan.baidu.com/s/1geVargZ OpenGL_ES(6.8).zip
0 0
- OpenGLES---加载文字
- OpenGLES---加载纹理
- opengles文字绘制相关资料
- opengles加载多个模型
- Opengles 显示文字 (Opengl ES笔记)
- opengles
- opengles
- opengles
- Opengles
- OpenGLES
- OpenGLES加载tga文件为纹理
- OpenGLES加载BMP文件为纹理
- Android如何加载硬件OpenGLES库
- opengles加载xml格式的三维模型
- OpenGLES加载png纹理/WinCE6.0/Cximage库
- OpenGLES加载png纹理/WinCE6.0/Cximage库
- opengles之3D模型加载(obj模型文件)
- opencv 加载文字
- 理解android与服务器交互
- ssh环境搭建(1)-lib篇(spring4.2.6+struts2.5+hibernate5.1 )
- el表达式取出集合等元素
- cuda纹理内存使用
- WPF对象的XAML序列化
- OpenGLES---加载文字
- TCP协议传输
- Android屏幕density, dip等相关概念总结
- log4j的配置文件配置出多个logger
- 用array_count_values统计一篇英文文档中每个单词的出现次数,结果用表格展示出来
- 全国十大热招职能,企业薪资数据揭秘
- 超详细的django1.8处理centos下nginx上处理静态文件步骤!
- WYDC项目开发
- 64位centos6.7安装mysql-5.7.11