| 99 | } |
| 100 | |
| 101 | Font* GetFont(const char* id){ |
| 102 | Font* font; |
| 103 | try{ |
| 104 | font = fonts.at(id); |
| 105 | } catch (const std::out_of_range& e){ |
| 106 | fprintf(stderr, "Warning: font %s could not be found!", id); |
| 107 | font = mainFont; |
| 108 | } |
| 109 | return font; |
| 110 | } |
| 111 | }; |