Fix svace issue in face manager 21/323821/1
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 8 May 2025 00:51:35 +0000 (09:51 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 8 May 2025 00:51:35 +0000 (09:51 +0900)
Change-Id: I5cc87b24e04b8052a3fa3220192d1afd92b8a2fd
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali/internal/text/text-abstraction/plugin/font-face-manager.cpp

index 1b08bebdb66ebaaf71b0c1afb62801e8a09c359b..87877247869c84a39558c8f82236aea0f46cc03c 100644 (file)
@@ -98,12 +98,12 @@ FT_Error FontFaceManager::LoadFace(const FT_Library& freeTypeLibrary, const Font
 
     if(fontFileFound)
     {
-      error = FT_New_Memory_Face(freeTypeLibrary, reinterpret_cast<FT_Byte*>(AnyCast<uint8_t*>(fontFilePtr)), static_cast<FT_Long>(fileSize), 0, &ftFace);
+      error = FT_New_Memory_Face(freeTypeLibrary, reinterpret_cast<FT_Byte*>(AnyCast<uint8_t*>(fontFilePtr)), static_cast<FT_Long>(fileSize), static_cast<FT_Long>(faceIndex), &ftFace);
       DALI_LOG_DEBUG_INFO("FontFaceManager, FT_New_Memory_Face : %s\n", fontPath.c_str());
     }
     else
     {
-      error = FT_New_Face(freeTypeLibrary, fontPath.c_str(), faceIndex, &ftFace);
+      error = FT_New_Face(freeTypeLibrary, fontPath.c_str(), static_cast<FT_Long>(faceIndex), &ftFace);
       DALI_LOG_DEBUG_INFO("FontFaceManager, FT_New_Face : %s\n", fontPath.c_str());
     }
 
@@ -182,7 +182,7 @@ void FontFaceManager::BuildVariations(FT_Face ftFace, const Property::Map* varia
       else
       {
         freeTypeCoords[axisIndex] = mm_var->axis[axisIndex].def;
-        value                     = freeTypeCoords[axisIndex] / FROM_16DOT16;
+        value                     = static_cast<float>(freeTypeCoords[axisIndex]) / static_cast<float>(FROM_16DOT16);
       }
 
       hb_variation_t harfBuzzVariation;