extern "C" 
{

//------------------------------------------------------------------------------------
// irr::gui::IGUIFont wrappers
// do not delete a pointer to this
//------------------------------------------------------------------------------------

	s32 IrrGUI_IGUIFont_getCharacterFromPos(IGUIFont* font,const c8* text,s32 pixel_x)
	{
		if (font)
			return font->getCharacterFromPos(stringw(text).c_str(),pixel_x);
		else return 0;
	}
	
	dimension2d<s32>* IrrGUI_IGUIFont_getDimension(IGUIFont* font,const c8* text)
	{
		if (font)
			return new dimension2d<s32>(font->getDimension(stringw(text).c_str()));
		else return 0;
	}
	
	void IrrGUI_IGUIFont_draw(IGUIFont* font,const c8* text,rect<s32>* position,SColor* color,bool hcenter=false,bool vcenter=false,rect<s32> *clip=0)
	{
		if (font)
			font->draw(stringw(text).c_str(),*position,*color,hcenter,vcenter,clip);
	}

	s32 IrrGUI_IGUIFont_getType(IGUIFont* font)
	{
		if (font)
			return font->getType();
		else return -1;
	}
	
	void IrrGUI_IGUIFont_setKerningWidth(IGUIFont* font,s32 kerning)
	{
		if (font)
			font->setKerningWidth(kerning);
	}
	
	void IrrGUI_IGUIFont_setKerningHeight(IGUIFont* font,s32 kerning)
	{	
		if (font)
			font->setKerningHeight(kerning);
	}
	
	s32 IrrGUI_IGUIFont_getKerningWidth(IGUIFont* font,const c8* thisLetter=0, const c8* previousLetter=0)
	{
		if (font)
			return font->getKerningWidth(stringw(thisLetter).c_str(),stringw(previousLetter).c_str());			
		else return 0;
	}
	
	s32 IrrGUI_IGUIFont_getKerningHeight(IGUIFont* font)
	{
		if (font)
			return font->getKerningHeight();
		else return 0;
	}

	void IrrGUI_IGUIFont_setInvisibleCharacters(IGUIFont* font, const c8* s) {
		if (font)
			font->setInvisibleCharacters(stringw(s).c_str());
	}
	
	bool IrrGUI_IGUIFont_drop(IGUIFont* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrGUI_IGUIFont_getDebugName(IGUIFont* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrGUI_IGUIFont_grab(IGUIFont* unk)
	{
		if (unk)
			unk->grab();
	}

}