92 unsigned char Char_Width( WCHAR ch = (WCHAR)
'H' ) {
return CharWidthTable[ch&0xFF]; }
96 inline float Char_U_Offset( WCHAR ch = (WCHAR)
'H') {
return UOffsetTable[ch&0xFF]; }
97 inline float Char_V_Offset( WCHAR ch = (WCHAR)
'H') {
return VOffsetTable[ch&0xFF]; }
98 inline float Char_U_Width( WCHAR ch = (WCHAR)
'H' ) {
return UWidthTable[ch&0xFF]; }
105 return Vector4( UOffsetTable[ch], VOffsetTable[ch],
106 UOffsetTable[ch] + UWidthTable[ch],
107 VOffsetTable[ch] + VHeight );
124 float UOffsetTable[ 256 ];
125 float VOffsetTable[ 256 ];
126 float UWidthTable[ 256 ];
129 unsigned char CharWidthTable[ 256 ];
130 unsigned char CharHeight;
135 bool Load_Font_Image(
const char *filename );
183 float Char_Width( WCHAR ch )
const {
return ScaledWidthTable[ch&0xFF]; }
184 float Char_Spacing( WCHAR ch )
const {
return ScaledSpacingTable[ch&0xFF]; }
204 FontData->Char_V_Offset(ch),
205 FontData->Char_U_Offset(ch) + FontData->Char_U_Width(ch),
206 FontData->Char_V_Offset(ch) + FontData->Char_V_Height(ch) ); }
212 float InterCharSpacing;
215 float ScaledWidthTable[256];
216 float ScaledSpacingTable[256];
219 void Build_Cached_Tables();
Color scale(const Color &a, const Color &b)
float Char_U_Width(WCHAR ch=(WCHAR) 'H')
unsigned char Char_Width(WCHAR ch=(WCHAR) 'H')
unsigned char Char_Height(WCHAR)
float Char_V_Height(WCHAR)
float Char_U_Offset(WCHAR ch=(WCHAR) 'H')
TextureClass * Peek_Texture(void)
float Char_V_Offset(WCHAR ch=(WCHAR) 'H')
Font3DDataClass(const char *filename)
Vector4 Char_UV_Corners(WCHAR ch=(WCHAR) 'H')
float Char_Spacing(WCHAR ch) const
void Set_Proportional(void)
RectClass Char_UV(WCHAR ch)
TextureClass * Peek_Texture(void)
Font3DInstanceClass(const char *filename)
void Set_Scale(float scale)
float Char_Width(WCHAR ch) const
void Set_Mono_Spaced(void)
float Char_Height(void) const
float String_Width(const WCHAR *test_str)