smaller glyph structure

master
Alessandro Mauri 1 year ago
parent 925be11603
commit 4c2b0ef847
  1. 3
      text_rendering/font.h
  2. 2
      text_rendering/ren.c

@ -25,7 +25,8 @@
// TODO: the advance isn't unique for every pair of characters
struct font_glyph {
unsigned int codepoint;
unsigned int u, v, w, h, a, x, y;
unsigned int u, v;
unsigned short int w, h, a, x, y;
};
struct font_atlas {

@ -708,7 +708,7 @@ int ren_render_text(const char *str, int x, int y, int w, int h, int size)
const struct font_glyph *g;
size_t ret, off;
uint32_t cp;
int updated, gx = x, gy = y;
int gx = x, gy = y;
int idx = ren_get_font(size);
if (idx < 0)
return -1;

Loading…
Cancel
Save