From a72830557367b279b690acd33ee716da37de8727 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Tue, 22 Nov 2022 01:06:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'3rdparty/fonts/fnt.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdparty/fonts/fnt.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3rdparty/fonts/fnt.cxx b/3rdparty/fonts/fnt.cxx index 05197ba..71595ad 100644 --- a/3rdparty/fonts/fnt.cxx +++ b/3rdparty/fonts/fnt.cxx @@ -190,7 +190,7 @@ void fntTexFont::getBBox ( const char *s, if ( (cc & 0XE0) == 0XE0) { SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc=" << cc); - int x = cc << 4; + int x = (cc & 0X0F) << 4; SG_LOG(SG_GUI,SG_ALERT, "UTF8 cc<<4 " << x); @@ -199,9 +199,9 @@ void fntTexFont::getBBox ( const char *s, SG_LOG(SG_GUI,SG_ALERT, "UTF81 cc=" << cc); - x= x + ((cc>>2) & 0x0F); + x= x + ((cc & 0x3C) >>2 ) ; - int y = (cc & 0x03) * 0X3F; + int y = (cc & 0x03) << 6 ; cc = (unsigned char) *(s++) ;