#pragma once

#include "halleystring.h"

struct _TTF_Font;
typedef struct _TTF_Font TTF_Font;

namespace Halley {
	class ResourceData;

	class Font {
	public:
		Font(String face="Arial", float size=12, bool bold=false, bool italics=false);
		~Font();

		String face;
		float size;
		bool bold;
		bool italics;
		int ascent;
		int lineSkip;

		void getMetrics(int character, int& minx, int& maxx, int& miny, int& maxy, int& advance);
		SDL_Surface* renderGlyph(int character);
	private:
		TTF_Font* font;
	};

	class FontFile {
	public:
		FontFile(String name);
		~FontFile();

		shared_ptr<ResourceData> data;
	};
}
