Made width return a floating point.

This commit is contained in:
Adam Harrison
2021-09-24 23:34:19 -04:00
parent c5fda5237f
commit d07d0e6d22
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -206,8 +206,8 @@ int ren_font_get_tab_size(RenFont *font) {
return font_get_glyphset(font, '\t')->metrics['\t'].xadvance / font->space_advance;
}
int ren_font_get_width(RenFont *font, const char *text) {
int width = 0;
float ren_font_get_width(RenFont *font, const char *text) {
float width = 0;
const char* end = text + strlen(text);
while (text < end) {
unsigned int codepoint;