| 60 | static StringMap<BMFontConfiguration*>* s_configurations = nullptr; |
| 61 | |
| 62 | BMFontConfiguration* FNTConfigLoadFile(std::string_view fntFile) |
| 63 | { |
| 64 | BMFontConfiguration* ret = nullptr; |
| 65 | |
| 66 | if (s_configurations == nullptr) |
| 67 | { |
| 68 | s_configurations = new StringMap<BMFontConfiguration*>(); |
| 69 | } |
| 70 | |
| 71 | ret = s_configurations->at(fntFile); |
| 72 | if (ret == nullptr) |
| 73 | { |
| 74 | ret = BMFontConfiguration::create(fntFile); |
| 75 | if (ret) |
| 76 | { |
| 77 | s_configurations->insert(fntFile, ret); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | return ret; |
| 82 | } |
| 83 | |
| 84 | // |
| 85 | // BitmapFontConfiguration |