steering-wheel/Middlewares/ST/touchgfx/framework/tools/textconvert/Templates/ApplicationFontProvider.cpp...

29 lines
860 B
Plaintext
Raw Normal View History

2023-03-06 21:21:00 +01:00
/* DO NOT EDIT THIS FILE */
/* This file is autogenerated by the text-database code generator */
#include <fonts/ApplicationFontProvider.hpp>
#include <fonts/GeneratedFont.hpp>
#include <texts/TypedTextDatabase.hpp>
<% if save_flashreader? %>
touchgfx::FlashDataReader* ApplicationFontProvider::fontFlashReader = 0;
<% end %>
touchgfx::Font* ApplicationFontProvider::getFont(touchgfx::FontId typography)
{
<% if @typographies.empty? %>
return 0;
<% else %>
switch (typography)
{
<% @typographies.each_with_index do |typography, index| %>
case Typography::<%= typography.name.upcase %>:
// <%= typography.cpp_name %>_<%= typography.font_size %>_<%= typography.bpp %>bpp
return const_cast<touchgfx::Font*>(TypedTextDatabase::getFonts()[<%= get_font_index(index) %>]);
<% end %>
default:
return 0;
}
<% end %>
}