diff --git a/Sources/Engine/Graphics/Font.cpp b/Sources/Engine/Graphics/Font.cpp index f3fe2c7..d5fd8d4 100644 --- a/Sources/Engine/Graphics/Font.cpp +++ b/Sources/Engine/Graphics/Font.cpp @@ -99,7 +99,7 @@ void CFontData::Read_t( CTStream *inFile) // throw char * SetCharSpacing(+1); SetLineSpacing(+1); SetSpaceWidth(0.5f); - fd_fcdFontCharData[' '].fcd_pixStart = 0; + fd_fcdFontCharData[(int)' '].fcd_pixStart = 0; } void CFontData::Write_t( CTStream *outFile) // throw char * @@ -201,7 +201,7 @@ void CFontData::Make_t( const CTFileName &fnTexture, PIX pixCharWidth, PIX pixCh iLetter++; // skip carriage return } // set default space width - fd_fcdFontCharData[' '].fcd_pixStart = 0; + fd_fcdFontCharData[(int)' '].fcd_pixStart = 0; SetSpaceWidth(0.5f); // all done diff --git a/Sources/Engine/Graphics/Font.h b/Sources/Engine/Graphics/Font.h index cacb307..f5056a5 100644 --- a/Sources/Engine/Graphics/Font.h +++ b/Sources/Engine/Graphics/Font.h @@ -71,7 +71,7 @@ public: inline void SetFixedWidth(void) { fd_bFixedWidth = TRUE; }; inline void SetVariableWidth(void) { fd_bFixedWidth = FALSE; }; inline void SetSpaceWidth( FLOAT fWidthRatio) { // relative to char cell width (1/2 is default) - fd_fcdFontCharData[' '].fcd_pixEnd = (PIX)(fd_pixCharWidth*fWidthRatio); } + fd_fcdFontCharData[(int)' '].fcd_pixEnd = (PIX)(fd_pixCharWidth*fWidthRatio); } void Read_t( CTStream *inFile); // throw char * void Write_t( CTStream *outFile); // throw char *