1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     font_ResFont.h
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Revision: 27535 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_FONT_FONT_RES_FONT_H_
17 #define NN_FONT_FONT_RES_FONT_H_
18 
19 #include <nn/types.h>
20 #include <nn/font/font_ResFontBase.h>
21 
22 namespace nn {
23 namespace font {
24 
25 //---------------------------------------------------------------------------
26 //
27 //---------------------------------------------------------------------------
28 class ResFont : public ResFontBase
29 {
30 public:
31     /* ------------------------------------------------------------------------
32             Functions
33        ------------------------------------------------------------------------ */
34 
35     //
36     //
37 
38     //
39                             ResFont();
40 
41     //
42     virtual                 ~ResFont();
43 
44     //
45 
46     //
47     //
48 
49     //
50     //
51     //
52     //
53     //
54     //
55     //
56     //
57     //
58     bool                    SetResource(void* bfnt);
59 
60     //
61     //
62     //
63     //
64     //
65     //
66     void*                   RemoveResource();
67 
68     using ResFontBase::IsManaging;
69 
70     //
71     //
72     //
73     //
74     //
75     //
76     static u32              GetDrawBufferSize(const void* bfnt);
77 
78     //
79     //
80     //
81     //
GetDrawBuffer()82     void*                   GetDrawBuffer()
83     {
84         return GetTextureObjectsBufferPtr();
85     }
86 
87     //
88     //
89     //
90     //
91     //
92     //
93     //
94     //
95     //
96     //
97     void*                   SetDrawBuffer(void* buffer);
98 
99     //
100 
101 
102 private:
103     /* ------------------------------------------------------------------------
104             Functions
105        ------------------------------------------------------------------------ */
106 
107     //
108     //
109     //
110     //
111     //
112     //
113     //
114     //
115     //
116     static FontInformation* Rebuild(detail::BinaryFileHeader* fileHeader);
117 };
118 
119 }   // namespace font
120 }   // namespace nn
121 
122 #endif //  NN_FONT_FONT_RES_FONT_H_
123