更新 '3rdparty/fonts/fnt.cxx'

This commit is contained in:
zhongjin 2022-11-22 12:03:40 +08:00
parent 662340a667
commit bd3528d580

View File

@ -61,7 +61,7 @@ float fntTexFont::low_putch ( sgVec3 curpos, float pointsize,
cc = cc - 'a' + 'A' ; cc = cc - 'a' + 'A' ;
*/ */
SG_LOG(SG_GUI,SG_ALERT, "未找到字符"); SG_LOG(SG_GUI,SG_ALERT, "low_putch 未找到字符 cc=" << cc);
if ( cc == ' ' ) if ( cc == ' ' )
{ {
@ -169,7 +169,7 @@ void fntTexFont::getBBox ( const char *s,
float l, r, b, t ; float l, r, b, t ;
//zhongjin //zhongjin
SG_LOG(SG_GUI,SG_ALERT, "getBBox " << s); //SG_LOG(SG_GUI,SG_ALERT, "getBBox " << s);
l = r = b = t = 0.0f ; l = r = b = t = 0.0f ;
@ -236,7 +236,7 @@ void fntTexFont::getBBox ( const char *s,
} }
if ( ! exists [ cc ] ) { if ( ! exists [ cc ] ) {
SG_LOG(SG_GUI,SG_ALERT, "未找到字符"); SG_LOG(SG_GUI,SG_ALERT, "getBBox 未找到字符 cc=" << cc);
continue ; continue ;
} }
@ -259,7 +259,7 @@ void fntTexFont::getBBox ( const char *s,
} }
//zhongjin //zhongjin
SG_LOG(SG_GUI,SG_ALERT, "......................"); //SG_LOG(SG_GUI,SG_ALERT, "......................");
if ( left != NULL ) *left = l * pointsize ; if ( left != NULL ) *left = l * pointsize ;
@ -287,6 +287,9 @@ void fntTexFont::puts ( sgVec3 curpos, float pointsize, float italic, const char
curpos[1] -= pointsize ; curpos[1] -= pointsize ;
} }
else else
SG_LOG(SG_GUI,SG_ALERT, "low_putch " << *s);
low_putch ( curpos, pointsize, italic, *s ) ; low_putch ( curpos, pointsize, italic, *s ) ;
s++ ; s++ ;