From 3dc912b1327275bcc0bc9d87c68c976f06ac0b50 Mon Sep 17 00:00:00 2001 From: Sungyeon Woo Date: Tue, 1 Oct 2013 11:54:44 +0900 Subject: [PATCH] remove boldspace Change-Id: I920eb93e756a1e8554ce14da25a3923fdd2db491 Signed-off-by: Sungyeon Woo --- src/graphics/FGrp_Font.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp index 8400cf1..dfe04d0 100644 --- a/src/graphics/FGrp_Font.cpp +++ b/src/graphics/FGrp_Font.cpp @@ -57,6 +57,7 @@ #include "util/FGrp_UtilTemplate.h" //#define USE_FONTCONFIG +//#define APPLY_BOLD_SPACE #define SYNCHRONIZATION_2_0 #define __pNativeFont __sharedFont.get() @@ -1010,12 +1011,14 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int _IFont::Property property; GET_FONT_PROPERTY(property, false); +#ifdef APPLY_BOLD_SPACE if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT) { _IFont::Attrib attr; pThis->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif const wchar_t* pText = text.pStart; int length = text.length; @@ -1183,6 +1186,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& } } +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1192,6 +1196,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& pThis->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif const wchar_t* pText = text.pStart; int length = text.length; @@ -1355,6 +1360,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa } #endif +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1367,6 +1373,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } } +#endif int curX = 0; int curY = 0; @@ -1733,6 +1740,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text } } +#ifdef APPLY_BOLD_SPACE _IFont::Property property; GET_FONT_PROPERTY(property, false); @@ -1742,6 +1750,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text this->GetAttrib(attr); boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); } +#endif const wchar_t* pText = text.pStart; int length = text.length; -- 2.7.4