diff options
author | Jon Bergli Heier <jonheier@start.no> | 2007-10-01 00:04:47 +0200 |
---|---|---|
committer | Jon Bergli Heier <jonheier@start.no> | 2007-10-01 00:04:47 +0200 |
commit | c062ac07e6241cf32a4a5655775aa037bdb1e76e (patch) | |
tree | a3b41bfc3ea1b57af6b95e4072ce7fcbbdaa4afb /fscalc.h | |
parent | 2b47e8d3c263bdaff9d48f3a1a480631b22ee145 (diff) |
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.
Diffstat (limited to 'fscalc.h')
-rw-r--r-- | fscalc.h | 24 |
1 files changed, 24 insertions, 0 deletions
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 <string> +#include <fontconfig/fontconfig.h> +#include <ft2build.h> +#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 |