/* DO NOT EDIT THIS FILE */
/* This file is autogenerated by the text-database code generator */

#ifndef APPLICATIONFONTPROVIDER_HPP
#define APPLICATIONFONTPROVIDER_HPP

#include <touchgfx/FontManager.hpp>

namespace touchgfx
{
    class FlashDataReader;
}

struct Typography
{
<% typographies.each_with_index do |typography, index| %>
    static const touchgfx::FontId <%= typography.name.upcase %> = <%= index %>;
<% end %>
};

struct TypographyFontIndex
{
<% typographies.each_with_index do |typography, index| %>
    static const touchgfx::FontId <%= typography.name.upcase %> = <%= font_index(index) %>; <%= font_comment(index) %>
<% end %>
    static const uint16_t NUMBER_OF_FONTS = <%= max_font_index %>;
};

class ApplicationFontProvider : public touchgfx::FontProvider
{
public:
    virtual touchgfx::Font* getFont(touchgfx::FontId typography);

<% if save_flashreader %>
    static void setFlashReader(touchgfx::FlashDataReader* flashReader) { fontFlashReader = flashReader; }
    static touchgfx::FlashDataReader* getFlashReader() { return fontFlashReader; }
private:
    static touchgfx::FlashDataReader* fontFlashReader;
<% else %>
    static void setFlashReader(touchgfx::FlashDataReader* /* flashReader */) { }
    static touchgfx::FlashDataReader* getFlashReader() { return 0; }
<% end %>
};

#endif // APPLICATIONFONTPROVIDER_HPP
