From 125bf163dc58e696283eb8386c8861db38ab80f8 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 18 Feb 2022 20:42:12 +0800 Subject: [PATCH] added is_currency attribute at CharAttributes. --- inc/hgl/graph/font/FontSource.h | 1 + src/SceneGraph/font/FontSource.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/hgl/graph/font/FontSource.h b/inc/hgl/graph/font/FontSource.h index 4b4cfbfa..e903ae94 100644 --- a/inc/hgl/graph/font/FontSource.h +++ b/inc/hgl/graph/font/FontSource.h @@ -41,6 +41,7 @@ namespace hgl bool is_cjk; ///<是否是中日韩文字 bool is_emoji; ///<是否是表情符号 + bool is_currency; ///<是否货币符号 bool is_punctuation; ///<是否是标点符号 diff --git a/src/SceneGraph/font/FontSource.cpp b/src/SceneGraph/font/FontSource.cpp index 34f8a43c..74b7b022 100644 --- a/src/SceneGraph/font/FontSource.cpp +++ b/src/SceneGraph/font/FontSource.cpp @@ -59,8 +59,10 @@ namespace hgl attr->begin_disable =hgl::strchr(BeginSymbols, ch,BeginSymbolsCount ); attr->end_disable =hgl::strchr(EndSymbols, ch,EndSymbolsCount ); - if(!attr->end_disable) //货币符号同样行尾禁用 - attr->end_disable =hgl::strchr(CurrencySymbols, ch,CurrencySymbolsCount ); + attr->is_currency =hgl::strchr(CurrencySymbols, ch,CurrencySymbolsCount ); + + if(!attr->end_disable) + attr->end_disable =attr->is_currency; //货币符号同样行尾禁用 attr->vrotate =hgl::strchr(VRotateSymbols, ch,VRotateSymbolsCount );