#pragma once

#include <daguerre/general.hpp>

//TODO: support more than just ascii

namespace daguerre {

  //forward declare since these depend on each other
  template <class color_t>
  class image;

  template <class color_t>
  class fixed_font {

  public:
    int glyph_width;
    int glyph_height;
    image<color_t> glyphs[128];

    //initializes every glyph to an empty image
    fixed_font();

    //initializes each glyph to have the right dimensions and
    //a valid buffer, but does nothing to their contents.
    fixed_font(int glyph_width, int glyph_height);

    //moves the other font's glyphs here, then
    //sets the other font to have empty images.
    fixed_font(fixed_font<color_t> &&other);

    //moves the other font's glyphs here, then
    //sets the other font to have empty images.
    fixed_font<color_t> &operator =(fixed_font<color_t> &&other);

    //use one of the two constructors below instead
    fixed_font(const fixed_font<color_t> &other) = delete;

    //copies the other font's images here, passing them through conversion.
    template <class other_color_t>
    fixed_font(const fixed_font<other_color_t> &other,
      converter_t<color_t, other_color_t> *conversion = &default_conversion);

    //directly calls memcpy on the images' buffers. the second argument
    //does nothing except distinguish this from the other copy constructor.
    fixed_font(const fixed_font<color_t> &other, bool);

    //use copy constructor and move assignment instead
    fixed_font<color_t> &operator =(const fixed_font<color_t> &other) = delete;

    ~fixed_font() = default;

  };

}

#include <daguerre/impl/fixed-font.hpp>
