0026769: Chinese letters are not translated
authoranv <anv@opencascade.com>
Fri, 25 Dec 2015 07:55:07 +0000 (10:55 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 13 Jan 2016 12:10:08 +0000 (15:10 +0300)
Added a condition to omit empty symbols

src/Font/Font_BRepFont.cxx

index 6ac15ac..c538898 100755 (executable)
@@ -249,10 +249,15 @@ Standard_Boolean Font_BRepFont::renderGlyph (const Standard_Utf32Char theChar,
     return !theShape.IsNull();
   }
 
+  FT_Outline& anOutline = myFTFace->glyph->outline;
+
+  if (!anOutline.n_contours)
+    return Standard_False;
+
   TopLoc_Location aLoc;
   TopoDS_Face aFaceDraft;
   myBuilder.MakeFace (aFaceDraft, mySurface, myPrecision);
-  FT_Outline& anOutline = myFTFace->glyph->outline;
+
   // Get orientation is useless since it doesn't retrieve any in-font information and just computes orientation.
   // Because it fails in some cases - leave this to ShapeFix.
   //const FT_Orientation anOrient = FT_Outline_Get_Orientation (&anOutline);