zoukankan      html  css  js  c++  java
  • freetype下载和配置

    一 下载编译freetype库


    1 下载

    地址:http://www.freetype.org/
    得到压缩文件:freetype-2.5.3.tar.gz


    2 解压:

    直接解压,得到文件夹freetype-2.5.3


    3 编译:

    用vs2010打开:(路径)freetype-2.5.3uildswindowsvc2010freetype.sln




    二 将freetype库加入到project

    1 加入包括文件夹

    依次点击:Project->properties->VC++directories->Include Directories
    加入:(路径)freetype-2.5.3include


    2 加入库文件夹

    依次点击:Project->properties->VC++directories->Library Directories
    加入:(路径)freetype-2.5.3objswin32vc2010


    3 加入附加依赖项

    依次点击:Project->properties->Linker->Input->Additional Dependencies
    加入:(路径)freetype253.lib;freetype253_D.lib


    三 測试

    执行下面代码:


    #include <ft2build.h>
    #include FT_FREETYPE_H
    #include <iostream>
    using namespace std;
    
    
    int main()
    {
    	FT_Library library;
    	FT_Init_FreeType(&library);
    
    
    	FT_Face face;
    	FT_New_Face(library, "msyh.ttf", 0, &face);
    
    
    	cout<<"num_glyphs:"<<face->num_glyphs<<endl;
    	cout<<"num_faces:"<<face->num_faces<<endl;
    	system("Pause");
    	return 0;
    }




    能编译执行,就一切ok了
  • 相关阅读:
    select选中值传递到后台action中
    select into from 与insert into select from区别
    存储过程
    layer
    下拉框两级联动
    无限纠结——Zedboard上跑ubuntu详解
    静态时序分析SAT
    设计模式-(构型模式)
    内存断点调试的原理
    C语言中使用静态函数的好处
  • 原文地址:https://www.cnblogs.com/jzssuanfa/p/7274453.html
Copyright © 2011-2022 走看看