| 161 | } |
| 162 | |
| 163 | FontHandle *loadFont(FreetypeHandle *library, const char *filename) { |
| 164 | if (!library) |
| 165 | return NULL; |
| 166 | FontHandle *handle = new FontHandle; |
| 167 | FT_Error error = FT_New_Face(library->library, filename, 0, &handle->face); |
| 168 | if (error) { |
| 169 | delete handle; |
| 170 | return NULL; |
| 171 | } |
| 172 | handle->ownership = true; |
| 173 | return handle; |
| 174 | } |
| 175 | |
| 176 | FontHandle *loadFontData(FreetypeHandle *library, const byte *data, int length) { |
| 177 | if (!library) |
no outgoing calls
no test coverage detected