From 6ebd14f72aa3dff2f026db50771f3b0efb123bce Mon Sep 17 00:00:00 2001 From: halx99 Date: Mon, 20 Sep 2021 12:24:54 +0800 Subject: [PATCH] Fixup --- cocos/2d/CCFontFreeType.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cocos/2d/CCFontFreeType.cpp b/cocos/2d/CCFontFreeType.cpp index 1c07936c7e..10503eeea9 100644 --- a/cocos/2d/CCFontFreeType.cpp +++ b/cocos/2d/CCFontFreeType.cpp @@ -45,8 +45,6 @@ bool FontFreeType::_streamParsingEnabled = false; bool FontFreeType::_doNativeBytecodeHinting = true; const int FontFreeType::DistanceMapSpread = 3; -static FontFreeType* s_osFallbackFont = nullptr; - const char* FontFreeType::_glyphASCII = "\"!#$%&'()*+,-./" "0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" @@ -134,8 +132,6 @@ bool FontFreeType::initFreeType() void FontFreeType::shutdownFreeType() { - CC_SAFE_RELEASE_NULL(s_osFallbackFont); - if (_FTInitialized == true) { FT_Done_FreeType(_FTlibrary); @@ -413,7 +409,7 @@ unsigned char* FontFreeType::getGlyphBitmap(uint64_t theChar, if (FT_Load_Glyph(_fontRef, glyph_index, FT_LOAD_RENDER | FT_LOAD_NO_AUTOHINT)) break; -#if defined(_DEBUG) +#if defined(COCOS2D_DEBUG) && COCOS2D_DEBUG > 0 if (glyph_index == 0) { std::u32string charUTF32(1, theChar); @@ -424,9 +420,6 @@ unsigned char* FontFreeType::getGlyphBitmap(uint64_t theChar, charUTF8 = "\\n"; cocos2d::log("The font face: %s doesn't contains char: <%s>", _fontRef->charmap->face->family_name, charUTF8.c_str()); - - if (!_bOSFallbackFont && s_osFallbackFont) - return s_osFallbackFont->getGlyphBitmap(theChar, outWidth, outHeight, outRect, xAdvance); } #endif if (_distanceFieldEnabled) {