Initialize libbullet git in 2.0_beta.
[platform/upstream/libbullet.git] / Extras / CDTestFramework / AntTweakBar / src / TwFonts.h
1 //      ---------------------------------------------------------------------------
2 //
3 //      @file           TwFonts.h
4 //      @brief          Bitmaps fonts
5 //      @author         Philippe Decaudin - http://www.antisphere.com
6 //  @license    This file is part of the AntTweakBar library.
7 //                              Copyright © 2005, 2006 Philippe Decaudin.
8 //              For conditions of distribution and use, see License.txt
9 //
10 //      notes:          Private header
11 //                              TAB=4
12 //
13 //      ---------------------------------------------------------------------------
14
15
16 #if !defined ANT_TW_FONTS_INCLUDED
17 #define ANT_TW_FONTS_INCLUDED
18
19 //#include <AntTweakBar.h>
20
21 /*
22 A source bitmap includes 224 characters starting from ascii char 32 (i.e. space) to ascii char 255:
23   
24  !"#$%&'()*+,-./0123456789:;<=>?
25 @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
26 `abcdefghijklmnopqrstuvwxyz{|}~\7f
27 \80\81\82\83\84\85\86\87\88\89\8a\8b\8c\8d\8e\8f\90\91\92\93\94\95\96\97\98\99\9a\9b\9c\9d\9e\9f
28  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿
29 ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß
30 àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
31
32 First column of a source bitmap is a delimiter with color=zero at the end of each line of characters.
33 Last row of a line of characters is a delimiter with color=zero at the last pixel of each character.
34
35 */
36
37
38 struct CTexFont
39 {
40         unsigned char * m_TexBytes;
41         int                             m_TexWidth;             // power of 2
42         int                             m_TexHeight;    // power of 2
43         float                   m_CharU0[256];
44         float                   m_CharV0[256];
45         float                   m_CharU1[256];
46         float                   m_CharV1[256];
47         int                             m_CharWidth[256];
48         int                             m_CharHeight;
49         int                             m_NbCharRead;
50
51         CTexFont();
52         ~CTexFont();
53 };
54
55
56 CTexFont *TwGenerateFont(const unsigned char *_Bitmap, int _BmWidth, int _BmHeight);
57
58
59 extern CTexFont *g_DefaultSmallFont;
60 extern CTexFont *g_DefaultNormalFont;
61 extern CTexFont *g_DefaultLargeFont;
62
63 void TwGenerateDefaultFonts();
64 void TwDeleteDefaultFonts();
65
66
67 #endif  // !defined ANT_TW_FONTS_INCLUDED