00001 /* 00002 * FTGL - OpenGL font library 00003 * 00004 * Copyright (c) 2008 Sam Hocevar <sam@zoy.org> 00005 * 00006 * Permission is hereby granted, free of charge, to any person obtaining 00007 * a copy of this software and associated documentation files (the 00008 * "Software"), to deal in the Software without restriction, including 00009 * without limitation the rights to use, copy, modify, merge, publish, 00010 * distribute, sublicense, and/or sell copies of the Software, and to 00011 * permit persons to whom the Software is furnished to do so, subject to 00012 * the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be 00015 * included in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00018 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00019 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00020 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 00021 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 00022 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 00023 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00024 */ 00025 00026 #ifndef __ftgl__ 00027 # warning Please use <FTGL/ftgl.h> instead of <FTBufferFont.h>. 00028 # include <FTGL/ftgl.h> 00029 #endif 00030 00031 #ifndef __FTBufferFont__ 00032 #define __FTBufferFont__ 00033 00034 #ifdef __cplusplus 00035 00036 00043 class FTGL_EXPORT FTBufferFont : public FTFont 00044 { 00045 public: 00051 FTBufferFont(const char* fontFilePath); 00052 00061 FTBufferFont(const unsigned char *pBufferBytes, 00062 size_t bufferSizeInBytes); 00063 00067 ~FTBufferFont(); 00068 00069 protected: 00079 virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot); 00080 }; 00081 00082 #endif //__cplusplus 00083 00084 FTGL_BEGIN_C_DECLS 00085 00094 FTGL_EXPORT FTGLfont *ftglCreateBufferFont(const char *file); 00095 00096 FTGL_END_C_DECLS 00097 00098 #endif // __FTBufferFont__ 00099