00001 /* ==================================================== ======== ======= * 00002 * 00003 * unatfont.hpp 00004 * Ubit Project 00005 * Author: Eric Lecolinet 00006 * Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs 00007 * (C) 1999-2006 EricLecolinet / ENST Paris / http://www.enst.fr/~elc/ubit 00008 * 00009 * *********************************************************************** 00010 * COPYRIGHT NOTICE : 00011 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 00012 * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 00013 * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 00014 * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 00015 * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION. 00016 * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS. 00017 * *********************************************************************** 00018 * ==================================================== [(c)Elc] ======= * 00019 * ==================================================== ======== ======= */ 00020 00021 //pragma ident "@(#)unatfont.hpp ubit:05.05.00" 00022 #ifndef _unatfont_hpp_ 00023 #define _unatfont_hpp_ 00024 namespace ubit { 00025 00026 #ifdef HAVE_GL 00027 typedef GLuint U2dFont; 00028 class U3dFont; // hidden type 00029 #endif 00030 00033 struct UNatFont { 00034 static UNatFont* create(UNatDisp*, const UFontDesc&); 00035 00036 USysFont f; 00037 static USysFont loadSysFont(UNatDisp*, const UFontDesc&); 00038 00039 #ifdef HAVE_GL 00040 U2dFont f2d; 00041 U3dFont* f3d; 00042 bool is_ftgl_font; 00043 void render2d(float x, float y, const char* s, int len); 00044 void render3d(float x, float y, const char* s, int len); 00045 00046 static U3dFont* loadFTGLFont(UNatDisp*, const UFontDesc&); 00047 static U3dFont* loadTexFont(UNatDisp*, USysFont); 00048 #endif 00049 }; 00050 } 00051 #endif 00052