| 371 | } |
| 372 | |
| 373 | UI_Font *UI_load_font_file(UI_Context *ctx, char *path, int ASCII_start, int ASCII_end, int *sizes, int sizes_count) |
| 374 | { |
| 375 | int size = 0; |
| 376 | unsigned char *buffer = nullptr; |
| 377 | |
| 378 | FILE *file = fopen(path, "rb"); |
| 379 | fseek(file, 0, SEEK_END); |
| 380 | size = ftell(file); |
| 381 | fseek(file, 0, SEEK_SET); |
| 382 | buffer = (unsigned char *)malloc(size); |
| 383 | fread(buffer, size, 1, file); |
| 384 | fclose(file); |
| 385 | |
| 386 | UI_Font *F = UI_load_font_memory(ctx, buffer, size, ASCII_start, ASCII_end, sizes, sizes_count); |
| 387 | |
| 388 | free(buffer); |
| 389 | return F; |
| 390 | } |
| 391 | |
| 392 | void UI_push_vertex(UI_Context *ctx, UI_Vertex vertex) { |
| 393 | UI_assert(ctx != nullptr && "UI context *ctx is a null pointer!"); |
no test coverage detected