Commit 42f9760ab277cd634f28f9227e67d9f8097ec1d0

Thomas de Grivel 2024-02-25T09:09:32

metrics

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/libc3/window/sdl2/gl_vtext.c b/libc3/window/sdl2/gl_vtext.c
index dd3aaa0..e975746 100644
--- a/libc3/window/sdl2/gl_vtext.c
+++ b/libc3/window/sdl2/gl_vtext.c
@@ -252,8 +252,8 @@ bool gl_vtext_render_to_texture_random (s_gl_text *text, uw len)
       if (FT_Load_Glyph(face, glyphs[i], FT_LOAD_RENDER))
         continue;
       glyph = face->glyph;
-      printf("width %ld\n", glyph->metrics.width);
-    } while (! glyph->metrics.width);
+      printf("width %ld\n", glyph->metrics.width >> 6);
+    } while (! (glyph->metrics.width >> 6));
   }
   scale_y = face->size->metrics.y_scale / 65536.0;
   max_ascent = (u32) (face->ascender * scale_y) >> 6;