60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
/* DO NOT EDIT THIS FILE */
|
|
/* This file is autogenerated by the text-database code generator */
|
|
|
|
#ifndef TOUCHGFX_APPLICATIONFONTPROVIDER_HPP
|
|
#define TOUCHGFX_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 %> = <%= get_font_index(index) %>; <%= get_font_comment_space(index) %>// <%= get_font_comment(index) %>
|
|
<% end %>
|
|
static const uint16_t NUMBER_OF_FONTS = <%= get_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 // TOUCHGFX_APPLICATIONFONTPROVIDER_HPP
|