#ifndef GRAPHICFONT_H
#define GRAPHICFONT_H

#include <stdint.h>

#include "SDL.h"
#include "SDL_ttf.h"

#include <string>
using namespace std;

//GraphicFont stores the size and font for text to be drawn onto a bitmap.
//TTF Fonts are not fixed width and have a lot of vertical deadspace, so you cannot rely on font size alone to get the correct amount of space.
//You need to print out the text to see its dimensions.
class GraphicFont
{
 public:
  GraphicFont ();
  ~GraphicFont ();

  uint16_t getFontSize ();
  void setFontSize (int);

  TTF_Font * getFont ();
  void setFont (TTF_Font *);

  //This adjusts the spacing when you need to wrap the text, or handle deadspace in the TTF rendering. It's out of 16ths.
  uint16_t getSpacing();
  void setSpacing(uint16_t);

  void incRefCount ();
  void decRefCount ();
  uint32_t getRefCount ();

 private:
  uint32_t refCount;
  TTF_Font * font;
  uint16_t fontSize;
  uint16_t spacing; //out of 16ths.
};

#endif
