From c062ac07e6241cf32a4a5655775aa037bdb1e76e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 1 Oct 2007 00:04:47 +0200 Subject: Moved pykfx.py to pykfx/__init__.py Added self.names in Styles along with int support in __getitem__. Added setup.py. Added fscalc, an extension that calculates text sizes for a given font. Using boost.python-wrapper for fscalc. --- fscalc.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 fscalc.h (limited to 'fscalc.h') diff --git a/fscalc.h b/fscalc.h new file mode 100644 index 0000000..5046b8f --- /dev/null +++ b/fscalc.h @@ -0,0 +1,24 @@ +#ifndef _FSCALC_H_ +#define _FSCALC_H_ + +#include +#include +#include +#include FT_FREETYPE_H +#include FT_TRUETYPE_TABLES_H + +class Font { + FcConfig *fc; + FcPattern *aux; + FT_Library library; + FT_Face face; + public: + Font(std::string, int, int); + ~Font(); + void set_font_size(int); + double get_kerning(FT_UInt, FT_UInt); + unsigned int get_text_width(std::string); + unsigned int get_line_height(); +}; + +#endif -- cgit v1.2.3