1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: font_ArchiveFont.h 4 5 Copyright (C)2009-2012 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: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_FONT_FONT_ARCHIVE_FONT_H_ 17 #define NN_FONT_FONT_ARCHIVE_FONT_H_ 18 19 #include <nn/types.h> 20 #include <nn/font/font_ArchiveFontBase.h> 21 22 23 namespace nn { 24 namespace font { 25 26 //--------------------------------------------------------------------------- 27 // 28 // 29 //--------------------------------------------------------------------------- 30 class ArchiveFont : public ArchiveFontBase 31 { 32 public: 33 /* ------------------------------------------------------------------------ 34 Functions 35 ------------------------------------------------------------------------ */ 36 37 // 38 // 39 40 // 41 ArchiveFont(); 42 43 // 44 virtual ~ArchiveFont(); 45 46 // 47 48 49 // 50 // 51 52 // 53 // 54 // 55 // 56 // 57 // 58 // 59 // 60 // 61 // 62 static u32 GetRequireBufferSize( 63 const void* bfnt, 64 const char* glyphGroups = LOAD_GLYPH_ALL 65 ); 66 67 // 68 // 69 // 70 // 71 // 72 // 73 // 74 // 75 // 76 // 77 // 78 // 79 bool Construct( 80 void* pBuffer, 81 u32 bufferSize, 82 const void* bfnt, 83 const char* glyphGroups = LOAD_GLYPH_ALL 84 ); 85 86 // 87 // 88 // 89 // 90 // 91 // 92 // 93 // 94 // 95 // 96 bool InitStreamingConstruct( 97 ConstructContext* pContext, 98 void* pBuffer, 99 u32 bufferSize, 100 const char* glyphGroups = LOAD_GLYPH_ALL 101 ); 102 103 // 104 // 105 // 106 // 107 // 108 // 109 // 110 // 111 // 112 ConstructResult StreamingConstruct( 113 ConstructContext* pContext, 114 const void* stream, 115 u32 streamSize); 116 117 // 118 // 119 // 120 // 121 // 122 void* Destroy(); 123 124 // 125 126 // 127 // 128 129 // 130 // 131 // 132 // 133 // 134 virtual void GetGlyph( 135 Glyph* pGlyph, 136 CharCode c 137 ) const; 138 139 // 140 141 private: 142 /* ------------------------------------------------------------------------ 143 Functions 144 ------------------------------------------------------------------------ */ 145 //---- glyph index 146 147 // 148 // 149 // 150 // 151 // 152 void GetGlyphFromIndex( 153 Glyph* pGlyph, 154 GlyphIndex index 155 ) const; 156 }; 157 158 } // namespace font 159 } // namespace nn 160 161 #endif // NN_FONT_FONT_ARCHIVE_FONT_H_ 162