更新 '3rdparty/fonts/fnt.cxx'
This commit is contained in:
parent
88a9cbe2ca
commit
68b1758449
16
3rdparty/fonts/fnt.cxx
vendored
16
3rdparty/fonts/fnt.cxx
vendored
@ -191,13 +191,15 @@ void fntTexFont::getBBox ( const char *s,
|
|||||||
}
|
}
|
||||||
if ( (cc & 0XE0) == 0XE0) {
|
if ( (cc & 0XE0) == 0XE0) {
|
||||||
|
|
||||||
|
SG_LOG(SG_GUI,SG_ALERT, "UTF83 cc=" << cc);
|
||||||
|
|
||||||
int x = (cc & 0X0F) << 4;
|
int x = (cc & 0X0F) << 4;
|
||||||
|
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x);
|
//SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x);
|
||||||
|
|
||||||
cc = (unsigned char) *(s++) ;
|
cc = (unsigned char) *(s++) ;
|
||||||
|
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc);
|
SG_LOG(SG_GUI,SG_ALERT, "UTF82 cc=" << cc);
|
||||||
|
|
||||||
x= x + ((cc & 0x3C) >>2 ) ;
|
x= x + ((cc & 0x3C) >>2 ) ;
|
||||||
|
|
||||||
@ -205,7 +207,7 @@ void fntTexFont::getBBox ( const char *s,
|
|||||||
|
|
||||||
cc = (unsigned char) *(s++) ;
|
cc = (unsigned char) *(s++) ;
|
||||||
|
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF82 cc=" << cc);
|
SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc);
|
||||||
|
|
||||||
y= y + (cc & 0x3F);
|
y= y + (cc & 0x3F);
|
||||||
|
|
||||||
@ -292,17 +294,23 @@ void fntTexFont::puts ( sgVec3 curpos, float pointsize, float italic, const char
|
|||||||
else
|
else
|
||||||
|
|
||||||
if ( (cc & 0XE0) == 0XE0) {
|
if ( (cc & 0XE0) == 0XE0) {
|
||||||
|
SG_LOG(SG_GUI,SG_ALERT, "UTF83 cc=" << cc);
|
||||||
int x = (cc & 0X0F) << 4;
|
int x = (cc & 0X0F) << 4;
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x);
|
//SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x);
|
||||||
|
|
||||||
cc = (unsigned char) *(s++) ;
|
cc = (unsigned char) *(s++) ;
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc);
|
SG_LOG(SG_GUI,SG_ALERT, "UTF82 cc=" << cc);
|
||||||
|
|
||||||
x= x + ((cc & 0x3C) >>2 ) ;
|
x= x + ((cc & 0x3C) >>2 ) ;
|
||||||
int y = (cc & 0x03) << 6 ;
|
int y = (cc & 0x03) << 6 ;
|
||||||
|
|
||||||
cc = (unsigned char) *(s++) ;
|
cc = (unsigned char) *(s++) ;
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "UTF82 cc=" << cc);
|
SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc);
|
||||||
|
|
||||||
y= y + (cc & 0x3F);
|
y= y + (cc & 0x3F);
|
||||||
//SG_LOG(SG_GUI,SG_ALERT, "x=" << x << ",y=" << y);
|
//SG_LOG(SG_GUI,SG_ALERT, "x=" << x << ",y=" << y);
|
||||||
cc = x * 256 + y;
|
cc = x * 256 + y;
|
||||||
|
|
||||||
SG_LOG(SG_GUI,SG_ALERT, "GBK cc=" << cc);
|
SG_LOG(SG_GUI,SG_ALERT, "GBK cc=" << cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user