1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
39
42
45
48
51
54
57
60
63
66
69
72
75
78
81
84
87
90
93
95
96
#include <fonts/ApplicationFontProvider.hpp>
#include <touchgfx/InternalFlashFont.hpp>
#ifndef NO_USING_NAMESPACE_TOUCHGFX
using namespace touchgfx;
#endif
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_11_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_18_4bpp();
extern touchgfx::InternalFlashFont& getFont_ipaexg_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_ipaexg_18_4bpp();
extern touchgfx::InternalFlashFont& getFont_NotoSans_Regular_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_NotoSans_Regular_18_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_18_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_46_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_15_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_15_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_18_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_15_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_15_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Regular_12_4bpp();
extern touchgfx::InternalFlashFont& getFont_Asap_Bold_otf_12_4bpp();
touchgfx::Font* ApplicationFontProvider::getFont(touchgfx::FontId fontId)
{
switch(fontId)
{
case Typography::DEMOVIEW_MCULOAD_TEXT:
return &(getFont_Asap_Regular_12_4bpp());
case Typography::DEMOVIEW_MCULOAD_TEXT:
case Typography::DEMOVIEW_MCULOAD_TEXT_SMALL:
return &(getFont_Asap_Regular_11_4bpp());
case Typography::DEMOVIEW_MCULOAD_TEXT_SMALL:
case Typography::POSTERTEXT:
return &(getFont_Asap_Regular_12_4bpp());
case Typography::POSTERTEXT:
case Typography::POSTERHEADLINE:
return &(getFont_Asap_Regular_18_4bpp());
case Typography::POSTERHEADLINE:
case Typography::POSTERTEXTJAPANESE:
return &(getFont_ipaexg_12_4bpp());
case Typography::POSTERTEXTJAPANESE:
case Typography::POSTERHEADLINEJAPANESE:
return &(getFont_ipaexg_18_4bpp());
case Typography::POSTERHEADLINEJAPANESE:
case Typography::POSTERTEXTUKR:
return &(getFont_NotoSans_Regular_12_4bpp());
case Typography::POSTERTEXTUKR:
case Typography::POSTERHEADLINEUKR:
return &(getFont_NotoSans_Regular_18_4bpp());
case Typography::POSTERHEADLINEUKR:
case Typography::THREEWAYPROGRESSBARPERCENTAGE:
return &(getFont_Asap_Bold_otf_12_4bpp());
case Typography::THREEWAYPROGRESSBARPERCENTAGE:
case Typography::THREEWAYPROGRESSBARBUTTON:
return &(getFont_Asap_Bold_otf_18_4bpp());
case Typography::THREEWAYPROGRESSBARBUTTON:
case Typography::CUSTOMCONTROLSSTATUS:
return &(getFont_Asap_Regular_12_4bpp());
case Typography::CUSTOMCONTROLSSTATUS:
case Typography::PERCENTAGEBARREADOUT:
return &(getFont_Asap_Bold_otf_46_4bpp());
case Typography::PERCENTAGEBARREADOUT:
case Typography::PERCENTAGEBARHEADLINE:
return &(getFont_Asap_Regular_15_4bpp());
case Typography::PERCENTAGEBARHEADLINE:
case Typography::DATEPICKER:
return &(getFont_Asap_Bold_otf_15_4bpp());
case Typography::DATEPICKER:
case Typography::EASINGEQUATION:
return &(getFont_Asap_Bold_otf_18_4bpp());
case Typography::EASINGEQUATION:
case Typography::EASINGEQUATIONBUTTON:
return &(getFont_Asap_Regular_15_4bpp());
case Typography::EASINGEQUATIONBUTTON:
case Typography::GRAPH_Y_VALUE:
return &(getFont_Asap_Regular_15_4bpp());
case Typography::GRAPH_Y_VALUE:
case Typography::GRAPH_LEGEND:
return &(getFont_Asap_Regular_12_4bpp());
case Typography::GRAPH_LEGEND:
case Typography::GRAPH_LEGEND_VALUE:
return &(getFont_Asap_Bold_otf_12_4bpp());
case Typography::GRAPH_LEGEND_VALUE:
default:
return 0;default
}switch (fontId) { ... }
}{ ... }