]> OCCT Git - occt.git/commitdiff
0032268: Fix build of the toolkits without freetype CR0032268_1
authorDzmitry Razmyslovich <dzmitry.razmyslovich@hexagon.com>
Thu, 25 Nov 2021 16:46:56 +0000 (17:46 +0100)
committerDzmitry Razmyslovich <dzmitry.razmyslovich@hexagon.com>
Thu, 25 Nov 2021 16:46:56 +0000 (17:46 +0100)
src/Font/Font_FTFont.cxx

index bdd4f572f769bda6a68950faad9c58224f338880..d4b4c8edf4dcd5fa9b265f805c493e8bac491fee 100755 (executable)
@@ -103,9 +103,12 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData,
   {
     throw Standard_ProgramError ("Font_FTFont, Light and Normal hinting styles are mutually exclusive");
   }
+
+#ifdef HAVE_FREETYPE
   setLoadFlag (FT_LOAD_TARGET_LIGHT,   (theParams.FontHinting & Font_Hinting_Light) != 0);
   setLoadFlag (FT_LOAD_NO_HINTING,     (theParams.FontHinting & Font_Hinting_Normal) == 0
                                     && (theParams.FontHinting & Font_Hinting_Light)  == 0);
+#endif
 
   // manage native / autohinting
   if ((theParams.FontHinting & Font_Hinting_ForceAutohint) != 0
@@ -113,8 +116,11 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData,
   {
     throw Standard_ProgramError ("Font_FTFont, ForceAutohint and NoAutohint are mutually exclusive");
   }
+
+#ifdef HAVE_FREETYPE
   setLoadFlag (FT_LOAD_FORCE_AUTOHINT, (theParams.FontHinting & Font_Hinting_ForceAutohint) != 0);
   setLoadFlag (FT_LOAD_NO_AUTOHINT,    (theParams.FontHinting & Font_Hinting_NoAutohint) != 0);
+#endif
 
   if (!myFTLib->IsValid())
   {