|
Blender
V2.59
|
00001 /* 00002 * $Id: BKE_font.h 36179 2011-04-15 03:47:54Z campbellbarton $ 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 #ifndef BKE_VFONT_H 00030 #define BKE_VFONT_H 00031 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00040 #include <wchar.h> 00041 00042 struct VFont; 00043 struct Scene; 00044 struct Object; 00045 struct Curve; 00046 struct objfnt; 00047 struct TmpFont; 00048 struct CharInfo; 00049 00050 struct chartrans { 00051 float xof, yof; 00052 float rot; 00053 short linenr,charnr; 00054 char dobreak; 00055 }; 00056 00057 typedef struct SelBox { 00058 float x, y, w, h; 00059 } SelBox; 00060 00061 typedef struct EditFont { 00062 wchar_t *copybuf; 00063 wchar_t *copybufinfo; 00064 00065 wchar_t *textbuf; 00066 struct CharInfo *textbufinfo; 00067 wchar_t *oldstr; 00068 struct CharInfo *oldstrinfo; 00069 00070 float textcurs[4][2]; 00071 00072 } EditFont; 00073 00074 00075 void BKE_font_register_builtin(void *mem, int size); 00076 00077 void free_vfont(struct VFont *sc); 00078 void free_ttfont(void); 00079 struct VFont *get_builtin_font(void); 00080 struct VFont *load_vfont(const char *name); 00081 struct TmpFont *vfont_find_tmpfont(struct VFont *vfont); 00082 00083 struct chartrans *BKE_text_to_curve(struct Scene *scene, struct Object *ob, int mode); 00084 00085 int BKE_font_getselection(struct Object *ob, int *start, int *end); 00086 00087 size_t chtoutf8(const unsigned long c, char o[4]); 00088 void wcs2utf8s(char *dst, const wchar_t *src); 00089 size_t wcsleninu8(wchar_t *src); 00090 size_t utf8towchar(wchar_t *w, const char *c); 00091 00092 #ifdef __cplusplus 00093 } 00094 #endif 00095 00096 #endif 00097