summaryrefslogtreecommitdiff
path: root/wrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wrapper.cpp')
-rw-r--r--wrapper.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/wrapper.cpp b/wrapper.cpp
new file mode 100644
index 0000000..9991b24
--- /dev/null
+++ b/wrapper.cpp
@@ -0,0 +1,12 @@
+#include <boost/python.hpp>
+#include "fscalc.h"
+
+using namespace boost::python;
+
+BOOST_PYTHON_MODULE(fscalc) {
+ class_<Font>("Font", init<std::string, int, int>())
+ .def("set_font_size", &Font::set_font_size)
+ .def("get_kerning", &Font::get_kerning)
+ .def("get_text_width", &Font::get_text_width)
+ .def("get_line_height", &Font::get_line_height);
+}