1 /*************************************************************************** 2 ADM_vidFont.h - description 3 ------------------- 4 begin : Sun Dec 15 2002 5 copyright : (C) 2002 by mean 6 email : fixounet@free.fr 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 #undef free 18 #undef alloc 19 #undef realloc 20 #ifdef HAVE_UNISTD_H 21 // avoid warnings due to different definition of this in freetype headers 22 #define WE_DO_HAVE_UNISTD_H 23 #undef HAVE_UNISTD_H 24 #endif 25 #include <ft2build.h> 26 #include FT_FREETYPE_H 27 #ifdef WE_DO_HAVE_UNISTD_H 28 #undef HAVE_UNISTD_H 29 #define HAVE_UNISTD_H 30 #endif 31 32 class ADMfont 33 { 34 private: 35 36 FT_Face _face; 37 int _faceAllocated; 38 uint8_t _use2bytes; 39 uint8_t _hold; 40 int _value; 41 public : 42 ADMfont(void ); 43 ~ADMfont(); 44 45 int initFreeType( char *fontname ); 46 int fontDraw(char *target, int c,int prevchar, int stride, int size,int *ww); 47 int fontSetSize ( int size); 48 int fontSetCharSet (char *code); 49 50 }; 51 52