26#define FILL_FONT_STRUCT_NAME(type, size) \
27 Chronos::Engine::FontStructs::type##_##size
29#define FONT_CASE(size) \
31 if (fontType == "arial") \
32 return FILL_FONT_STRUCT_NAME(arial, size); \
33 else if (fontType == "arial_bold") \
34 return FILL_FONT_STRUCT_NAME(arial_bold, size); \
35 else if (fontType == "consolas") \
36 return FILL_FONT_STRUCT_NAME(consolas, size); \
37 else if (fontType == "consolas_bold") \
38 return FILL_FONT_STRUCT_NAME(consolas_bold, size); \
39 else if (fontType == "courier") \
40 return FILL_FONT_STRUCT_NAME(courier, size); \
41 else if (fontType == "courier_bold") \
42 return FILL_FONT_STRUCT_NAME(courier_bold, size); \
43 else if (fontType == "times") \
44 return FILL_FONT_STRUCT_NAME(times, size); \
45 else if (fontType == "times_bold") \
46 return FILL_FONT_STRUCT_NAME(times_bold, size); \
48 throw std::runtime_error("Font type not found"); \
52 std::string fontType,
int fontSize)
101 throw std::runtime_error(
"Font size not found");
Defines all thes structs for all the font types and their sizes.
Chronos::Engine::FontTypes getFontType(std::string fontType, int fontSize)
The parameters needed for the font style.