Prepare Windows build to use FreeType

This commit is contained in:
wmayer
2013-06-11 17:28:21 +02:00
parent c322e10f3a
commit 6c1c33f568
8 changed files with 114 additions and 90 deletions

View File

@@ -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)
{

View File

@@ -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)

View File

@@ -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