cleanup
This commit is contained in:
parent
9f96626ea7
commit
6a02b24ae6
29 changed files with 653 additions and 583 deletions
|
|
@ -2,18 +2,6 @@
|
|||
#include <SDL3/SDL.h>
|
||||
#include <string.h>
|
||||
|
||||
const pxl8_glyph* pxl8_font_find_glyph(const pxl8_font* font, u32 codepoint) {
|
||||
if (!font || !font->glyphs) return NULL;
|
||||
|
||||
for (u32 i = 0; i < font->glyph_count; i++) {
|
||||
if (font->glyphs[i].codepoint == codepoint) {
|
||||
return &font->glyphs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pxl8_result pxl8_font_create_atlas(const pxl8_font* font, u8** atlas_data, i32* atlas_width, i32* atlas_height) {
|
||||
if (!font || !atlas_data || !atlas_width || !atlas_height) {
|
||||
return PXL8_ERROR_NULL_POINTER;
|
||||
|
|
@ -58,3 +46,15 @@ pxl8_result pxl8_font_create_atlas(const pxl8_font* font, u8** atlas_data, i32*
|
|||
|
||||
return PXL8_OK;
|
||||
}
|
||||
|
||||
const pxl8_glyph* pxl8_font_find_glyph(const pxl8_font* font, u32 codepoint) {
|
||||
if (!font || !font->glyphs) return NULL;
|
||||
|
||||
for (u32 i = 0; i < font->glyph_count; i++) {
|
||||
if (font->glyphs[i].codepoint == codepoint) {
|
||||
return &font->glyphs[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue