Prepare Windows build to use FreeType
This commit is contained in:
@@ -1699,13 +1699,6 @@ def makeShapeString(String,FontFile,Size = 100,Tracking = 0):
|
||||
into a Compound Shape'''
|
||||
|
||||
# temporary code
|
||||
import platform
|
||||
if not (platform.system() == 'Linux'):
|
||||
# if (platform.system() == 'Linux'):
|
||||
FreeCAD.Console.PrintWarning("Sorry, ShapeString is not yet implemented for your platform.\n")
|
||||
return (None)
|
||||
# temporary code
|
||||
|
||||
obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython","ShapeString")
|
||||
_ShapeString(obj)
|
||||
obj.String = String
|
||||
|
||||
@@ -1795,7 +1795,7 @@ class ShapeString(Creator):
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'Draft_ShapeString',
|
||||
'Accel' : "S, S",
|
||||
'MenuShapeString': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", "ShapeString"),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", "Shape from text..."),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", "Creates text string in shapes.")}
|
||||
|
||||
def Activated(self):
|
||||
@@ -1817,12 +1817,11 @@ class ShapeString(Creator):
|
||||
"creates object in the current doc"
|
||||
# print "debug: D_T ShapeString.createObject type(self.SString): " str(type(self.SString))
|
||||
# temporary code
|
||||
import platform
|
||||
if not (platform.system() == 'Linux'):
|
||||
# if (platform.system() == 'Linux'):
|
||||
FreeCAD.Console.PrintWarning("Sorry, ShapeString is not yet fully implemented for your platform.\n")
|
||||
self.finish()
|
||||
return
|
||||
#import platform
|
||||
#if not (platform.system() == 'Linux'):
|
||||
# FreeCAD.Console.PrintWarning("Sorry, ShapeString is not yet fully implemented for your platform.\n")
|
||||
# self.finish()
|
||||
# return
|
||||
# temporary code
|
||||
|
||||
dquote = '"'
|
||||
|
||||
@@ -342,17 +342,17 @@ static PyObject * makeWireString(PyObject *self, PyObject *args)
|
||||
&track)) {
|
||||
Base::Console().Message("** makeWireString bad args.\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (PyString_Check(intext)) {
|
||||
PyObject *p = Base::PyAsUnicodeObject(PyString_AsString(intext));
|
||||
if (!p) {
|
||||
Base::Console().Message("** makeWireString can't convert PyString.\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
pysize = PyUnicode_GetSize(p);
|
||||
unichars = PyUnicode_AS_UNICODE(p);
|
||||
}
|
||||
}
|
||||
else if (PyUnicode_Check(intext)) {
|
||||
pysize = PyUnicode_GetSize(intext);
|
||||
unichars = PyUnicode_AS_UNICODE(intext);
|
||||
@@ -376,7 +376,7 @@ static PyObject * makeWireString(PyObject *self, PyObject *args)
|
||||
|
||||
return (CharList);
|
||||
}
|
||||
#else
|
||||
#else
|
||||
|
||||
static PyObject * makeWireString(PyObject *self, PyObject *args)
|
||||
{
|
||||
|
||||
@@ -4,9 +4,9 @@ else(MSVC)
|
||||
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
|
||||
endif(MSVC)
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
add_definitions(-DFCUseFreeType)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
if(FREETYPE_FOUND)
|
||||
add_definitions(-DFCUseFreeType)
|
||||
endif(FREETYPE_FOUND)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
@@ -28,12 +28,12 @@ set(Part_LIBS
|
||||
FreeCADApp
|
||||
)
|
||||
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
if(FREETYPE_FOUND)
|
||||
set(Part_LIBS
|
||||
${Part_LIBS}
|
||||
${FREETYPE_LIBRARY}
|
||||
${FREETYPE_LIBRARIES}
|
||||
)
|
||||
endif(FREECAD_USE_FREETYPE)
|
||||
endif(FREETYPE_FOUND)
|
||||
|
||||
generate_from_xml(ArcPy)
|
||||
generate_from_xml(ArcOfCirclePy)
|
||||
|
||||
@@ -330,11 +330,11 @@ FT_Vector getKerning(FT_Face FTFont, UNICHAR lc, UNICHAR rc) {
|
||||
if(error) {
|
||||
ErrorMsg << "FT_Get_Kerning failed: " << error;
|
||||
throw std::runtime_error(ErrorMsg.str());
|
||||
}
|
||||
}
|
||||
retXY.x = ftKern.x;
|
||||
retXY.y = ftKern.y;
|
||||
return(retXY);
|
||||
}
|
||||
}
|
||||
|
||||
// Make a TopoDS_Wire from a list of TopoDS_Edges
|
||||
TopoShapeWirePy* edgesToWire(std::vector<TopoDS_Edge> Edges) {
|
||||
@@ -350,7 +350,7 @@ TopoShapeWirePy* edgesToWire(std::vector<TopoDS_Edge> Edges) {
|
||||
TopoShapeWirePy* newwire = new TopoShapeWirePy(new TopoShape (occwire));
|
||||
|
||||
return(newwire);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif //#ifdef FCUseFreeType
|
||||
#endif //#ifdef FCUseFreeType
|
||||
|
||||
Reference in New Issue
Block a user