| 83 | } |
| 84 | |
| 85 | HFont FontLoadFromPath(const char* path) |
| 86 | { |
| 87 | uint32_t data_size; |
| 88 | void* data = FontReadFile(path, &data_size); // we pass the ownership to the font implementation |
| 89 | if (!data) |
| 90 | { |
| 91 | return 0; |
| 92 | } |
| 93 | |
| 94 | Font* font = FontLoadFromMemory(path, data, data_size, true); |
| 95 | free(data); |
| 96 | if (!font) |
| 97 | { |
| 98 | return 0; |
| 99 | } |
| 100 | return font; |
| 101 | } |
| 102 | |
| 103 | uint32_t FontGetResourceSize(HFont font) |
| 104 | { |