Blender  V2.59
BLI_vfontdata.h
Go to the documentation of this file.
00001 /*
00002  * $Id: BLI_vfontdata.h 34966 2011-02-18 13:58:08Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  */
00029 
00030 #ifndef BLI_VFONTDATA_H
00031 #define BLI_VFONTDATA_H
00032 
00039 #include "DNA_listBase.h"
00040 
00041 struct PackedFile;
00042 struct VFont;
00043 
00044 #define MAX_VF_CHARS 256
00045 
00046 typedef struct VFontData {
00047         ListBase characters;
00048         // ListBase nurbsbase[MAX_VF_CHARS];
00049         // float            resol[MAX_VF_CHARS];
00050         // float            width[MAX_VF_CHARS];
00051         // float            *points[MAX_VF_CHARS];
00052          char           name[128];      
00053 } VFontData;
00054 
00055 typedef struct VChar {
00056         struct VChar    *next, *prev;
00057          ListBase        nurbsbase;
00058         intptr_t   index;
00059         float           resol;
00060         float           width;
00061         float           *points;
00062 } VChar;
00063 
00064 struct TmpFont
00065 {
00066         struct TmpFont *next, *prev;
00067         struct PackedFile *pf;
00068         struct VFont *vfont;
00069 };
00070 
00079         VFontData*
00080 BLI_vfontdata_from_freetypefont(
00081         struct PackedFile *pf);
00082 
00083         int
00084 BLI_vfontchar_from_freetypefont(
00085         struct VFont *vfont, unsigned long character);
00086 
00087 #endif
00088