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

This commit is contained in:
2022-11-22 00:57:13 +08:00
parent 71e2ca2b8c
commit f31a6e7da2

View File

@@ -191,14 +191,25 @@ void fntTexFont::getBBox ( const char *s,
SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc=" << cc);
int x = cc << 4;
SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x);
cc = (unsigned char) *(s++) ;
x= x + (cc<<2) >> 4;
SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc);
int y = (cc & 0X03 )<< 6 + (unsigned char) *(s++) & 0X7F;
x= x + (cc>>2) & 0x0F;
cc = x * 256 + y;
SG_LOG(SG_GUI,SG_ALERT, "U =" << cc);
int y = (cc & 0x03) * 0X3F;
cc = (unsigned char) *(s++) ;
SG_LOG(SG_GUI,SG_ALERT, "UTF82 cc=" << cc);
y= y + (cc & 0x3F);
SG_LOG(SG_GUI,SG_ALERT, "x=" << x << ",y=" << y);
}
if ( ! exists [ cc ] )