From ac9f02343ee9c22296143aad92073f2e9b196d56 Mon Sep 17 00:00:00 2001 From: Chukobyte Date: Thu, 16 May 2024 18:36:34 -0400 Subject: [PATCH] Added font delete function. --- seika/rendering/font.c | 4 ++++ seika/rendering/font.h | 1 + seika/version_info.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/seika/rendering/font.c b/seika/rendering/font.c index d94f00d..071a3d8 100644 --- a/seika/rendering/font.c +++ b/seika/rendering/font.c @@ -47,6 +47,10 @@ SkaFont* ska_font_create_font_from_memory(void* buffer, usize bufferSize, int32 return font; } +void ska_font_delete(SkaFont* font) { + SKA_MEM_FREE(font); +} + bool ska_generate_new_font_face(const char* fileName, FT_Face* face) { if (ska_asset_file_loader_get_read_mode() == SkaAssetFileLoaderReadMode_ARCHIVE) { SkaArchiveFileAsset fileAsset = ska_asset_file_loader_get_asset(fileName); diff --git a/seika/rendering/font.h b/seika/rendering/font.h index 14aaf8d..e541b26 100644 --- a/seika/rendering/font.h +++ b/seika/rendering/font.h @@ -23,3 +23,4 @@ typedef struct SkaFont { SkaFont* ska_font_create_font(const char* fileName, int32 size, bool applyNearestNeighbor); SkaFont* ska_font_create_font_from_memory(void* buffer, usize bufferSize, int32 size, bool applyNearestNeighbor); +void ska_font_delete(SkaFont* font); diff --git a/seika/version_info.h b/seika/version_info.h index 7f1eba0..8df35b0 100644 --- a/seika/version_info.h +++ b/seika/version_info.h @@ -4,6 +4,6 @@ #define SKA_VERSION_MAJOR 0 #define SKA_VERSION_MINOR 1 -#define SKA_VERSION_PATCH 4 +#define SKA_VERSION_PATCH 5 #define SKA_VERSION (SKA_MACRO_TO_STRING(SKA_VERSION_MAJOR) "." SKA_MACRO_TO_STRING(SKA_VERSION_MINOR) "." SKA_MACRO_TO_STRING(SKA_VERSION_PATCH))