From 7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:33 +0000 Subject: First commit - moving from LuaForge to SourceForge --- src/sim/truetype.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/sim/truetype.h (limited to 'src/sim/truetype.h') diff --git a/src/sim/truetype.h b/src/sim/truetype.h new file mode 100644 index 0000000..5675998 --- /dev/null +++ b/src/sim/truetype.h @@ -0,0 +1,46 @@ +/** \file + * \brief Text and Font Simulation using FreeType library. + * + * See Copyright Notice in cd.h + */ + +#ifndef __TRUETYPE_H +#define __TRUETYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ft2build.h" +#include FT_FREETYPE_H + +/* + In CD version 4.4 we start to use FreeType 2. + Only TrueType font support is enabled. +*/ + +typedef struct _cdTT_Text +{ + FT_Library library; + FT_Face face; + + unsigned char* rgba_data; + int rgba_data_size; + + int max_height; + int max_width; + int descent; + int ascent; + +}cdTT_Text; + +cdTT_Text* cdTT_create(void); +void cdTT_free(cdTT_Text * tt_text); +int cdTT_load(cdTT_Text * tt_text, const char *font,int size, double xres, double yres); + +#ifdef __cplusplus +} +#endif + +#endif /* ifndef _CD_TRUETYPE_ */ + -- cgit v1.2.3