aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/font.c')
-rw-r--r--src/graphics/font.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/font.c b/src/graphics/font.c
index 9a99f22..4fd9840 100644
--- a/src/graphics/font.c
+++ b/src/graphics/font.c
@@ -39,13 +39,13 @@ int mgl_font_load_from_file(mgl_font *self, const mgl_memory_mapped_file *mapped
self->font_info = malloc(sizeof(stbtt_fontinfo));
if(!self->font_info) {
- fprintf(stderr, "Error: failed to load font, error: out of memory\n");
+ fprintf(stderr, "mgl error: failed to load font, error: out of memory\n");
return -1;
}
/* TODO: Handle font offset with ttc */
if(!stbtt_InitFont(self->font_info, mapped_file->data, stbtt_GetFontOffsetForIndex(mapped_file->data, 0))) {
- fprintf(stderr, "Error: failed to load font, error: stbtt_InitFont failed\n");
+ fprintf(stderr, "mgl error: failed to load font, error: stbtt_InitFont failed\n");
mgl_font_unload(self);
return -1;
}
@@ -137,7 +137,7 @@ static void mgl_font_handle_new_render_position(mgl_font *self, int glyph_width)
mgl_font_char_iterator_next(&font_char_it);
}
} else {
- fprintf(stderr, "Error: failed to resize font atlas\n");
+ fprintf(stderr, "mgl error: failed to resize font atlas\n");
}
} else if(self->font_atlas.render_section == MGL_ATLAS_SECTION_RIGHT && self->font_atlas.pointer_position.y + self->current_line_max_height + (int)self->character_size + GLYPH_PADDING >= self->font_atlas.prev_height) {
self->font_atlas.right_section_height = self->font_atlas.pointer_position.y + self->current_line_max_height;
@@ -174,7 +174,7 @@ int mgl_font_get_glyph(mgl_font *self, uint32_t codepoint, mgl_font_glyph *glyph
if(mgl_texture_load_from_memory(&self->texture, NULL, initial_atlas_size, initial_atlas_size, MGL_IMAGE_FORMAT_ALPHA, &load_options) != 0) {
return -1;
} else {
- /*fprintf(stderr, "Error: failed to create font atlas texture, error: mgl_texture_load_from_memory failed\n");*/
+ /*fprintf(stderr, "mgl error: failed to create font atlas texture, error: mgl_texture_load_from_memory failed\n");*/
self->font_atlas.width = initial_atlas_size;
self->font_atlas.height = initial_atlas_size;
}