11#include < Font.hpp>
2- #include < FontEntry.hpp>
32#include < array>
43#include < cinttypes>
54
1312#include " IBMFDriver/IBMFFontData.hpp"
1413#include " IBMFFonts/SolSans_75.h"
1514
16- // clang-format on
17-
18- // Here is the list of all fonts that can be selected through a menu in the application.
19- //
20- // At boot time, the first entry in the list is loaded by default. If one of the other entries must
21- // be used to initialixe the font instance defined above, through a call to the font.load() method.
22- // For example:
23- //
24- // result = font.load((fonts_defs::MemoryPtr)fontsList[0].content, fontsList[0].length,
25- // fontsList[0].kerns, fontsList[0].ligatures);
26- // if (result) {
27- // ... was successfull
28- // } else {
29- // ... was not successfull
30- // }
31- //
32- // The same approach can be used to change the current font through a selection menu
33-
34- std::array<FontEntry, 1 > fontsList{{{" SolSans" , SOLSANS_75_IBMF, SOLSANS_75_IBMF_LEN}}};
35-
36- FontData mainFont = FontData(fontsList[0 ].content, fontsList[0 ].length);
15+ FontData mainFont = FontData(SOLSANS_75_IBMF, SOLSANS_75_IBMF_LEN);
3716
3817// The following definitions identifie three pre-defined empty font faces that are expected
3918// to be initialized through a call to font.load() method at application startup. It is expected
@@ -58,23 +37,6 @@ Font fontFace2 = Font(mainFont, 2);
5837#include " TTFDriver/TTFFont.hpp"
5938#include " TTFDriver/TTFNotoSansLight.hpp"
6039
61- // clang-format on
62-
63- // Here is the list of all fonts that can be selected through a menu in the application.
64- //
65- // At boot time, the first entry in the list is loaded by default. If one of the other entries must
66- // be used to initialixe the font instance defined above, through a call to the font.load() method.
67- // For example:
68- //
69- // result = font.load((ibmf_defs::MemoryPtr)fontsList[0].content, fontsList[0].length,
70- // fontsList[0].kerns, fontsList[0].ligatures); if (result) {
71- // ... was successfull
72- // } else {
73- // ... was not successfull
74- // }
75- //
76- // The same approach can be used to change the current font through a selection menu
77-
7840// The following defines the instance of a font that is containing all faces related to that font.
7941// The parameters are used to initialize the font at boot time to one of the fonts that is part of
8042// the list above. This is to insure that at any time, the font is loaded with one of the available
0 commit comments