diff --git a/frameworks/draw/draw_utils.h b/frameworks/draw/draw_utils.h index 0f47487f3fc8633dcd4bcf08006bdf516061ce14..cf144e8dac9f571be556b4167e5879606c2c3b07 100644 --- a/frameworks/draw/draw_utils.h +++ b/frameworks/draw/draw_utils.h @@ -108,7 +108,7 @@ struct LabelLetterInfo { }; struct TransformInitState { -#if ENABLE_FIXED_POINT +#if defined(ENABLE_FIXED_POINT) && ENABLE_FIXED_POINT // parameters below are Q15 fixed-point number int64_t verticalU; int64_t verticalV; diff --git a/frameworks/font/ui_font_vector.cpp b/frameworks/font/ui_font_vector.cpp index 7f196a44e70f20cfa79a88309e58e1434fac5261..82fb68e9ff88b0d1ae59fe7d7a13b2c53157f485 100644 --- a/frameworks/font/ui_font_vector.cpp +++ b/frameworks/font/ui_font_vector.cpp @@ -31,7 +31,7 @@ #if defined(ENABLE_MULTI_FONT) && ENABLE_MULTI_FONT #include "font/ui_multi_font_manager.h" #endif -#if ENABLE_SHAPING +#if defined(ENABLE_SHAPING) && ENABLE_SHAPING #include "font/ui_text_shaping.h" #endif #include "font/ui_font_cache_manager.h" @@ -682,7 +682,7 @@ int8_t UIFontVector::GetGlyphNode(uint32_t unicode, GlyphNode& glyphNode, uint16 uint8_t* UIFontVector::GetBitmap(uint32_t unicode, GlyphNode& glyphNode, uint16_t fontId, uint8_t fontSize) { uint16_t fontKey = GetKey(fontId, fontSize); -#if ENABLE_SPANNABLE_STRING +#if defined(ENABLE_SPANNABLE_STRING) && ENABLE_SPANNABLE_STRING uint8_t* bitmap = UIFontCacheManager::GetInstance()->GetBitmap(fontKey, unicode, glyphNode.textStyle); #else uint8_t* bitmap = UIFontCacheManager::GetInstance()->GetBitmap(fontKey, unicode); @@ -885,8 +885,7 @@ void UIFontVector::SetFace(FaceInfo& faceInfo, uint32_t unicode) if (faceInfo.face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) { pixSize = 0x04; // 4 Byte mode = ARGB8888; - } - else { + } else { pixSize = 1; mode = A8; } @@ -1107,7 +1106,7 @@ void UIFontVector::SetPsramMemory(uintptr_t psramAddr, uint32_t psramLen) int8_t UIFontVector::SetCurrentLangId(uint8_t langId) { FontRamAllocator::GetInstance().ClearRam(); -#if ENABLE_SHAPING +#if defined(ENABLE_SHAPING) && ENABLE_SHAPING UITextShaping::GetInstance()->ClearTtfHeader(); #endif UIFontCacheManager::GetInstance()->ClearCacheFlag();