#ifndef INCLUDED_PANELS_FONT
#define INCLUDED_PANELS_FONT

#include "Math/Rectangle.h"
#include <string>
#include <vector>
#include <memory>

//////////////////////////////////////////////////////////////
namespace Dubious {
namespace Utility {
class NativeAssetFile;
typedef std::shared_ptr<NativeAssetFile> NativeAssetFilePtr;
}
namespace Renderer {
class PngImage;
typedef std::shared_ptr<PngImage> PngImagePtr;
}

namespace Panels {

////////////////////////////////////////////////////////////////////////////////////
// font set is:
// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 
// 0 1 2 3 4 5 6 7 8 9
class Font
{
public:
	Font( Utility::NativeAssetFilePtr pNativeFile, int FontHeight );
	~Font();
	unsigned int        StringWidth( const std::string& Sentence ) const;
	unsigned int        Height() const { return m_Height; }
	Math::RectangleYDown LetterRectangle( char Letter ) const;
	Renderer::PngImagePtr Image() const { return m_Image; }
	int                 LetterPad() const { return 2; }
private:
	Font( const Font& );
	Font& operator=( const Font& );

	Math::RectangleYDown FindLetter( int &xStart, int &xEnd, int &yTop, int &yBottom, unsigned long ClearColour ) const;
	std::vector<Math::RectangleYDown> m_Letters;
	Renderer::PngImagePtr m_Image;
	unsigned int        m_Height;
};

}}

#endif
