Some more font updates

This commit is contained in:
2025-06-09 13:49:16 +02:00
parent bad08d974a
commit 743488d876
5 changed files with 3 additions and 5 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 B

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.
+3 -5
View File
@@ -123,8 +123,8 @@ Widget_label_render_text (Widget *widget, mat3 parent_model)
glm_mat3_copy (parent_model, model);
float char_width = wdg_real_height (model) / wdg_real_width (model) * (10.0 / 20.0);
/* * 1.5 because that's the step we use in the loop later on. */
float total_width = (widget->label.text->len - 1) * char_width * 1.5;
float char_spacing = 1.5;
float total_width = (widget->label.text->len - 1) * char_width * char_spacing;
switch (widget->label.alignment)
{
@@ -158,9 +158,7 @@ Widget_label_render_text (Widget *widget, mat3 parent_model)
program_set_float (RESPRG ("uitext"), "character", ch);
program_set_vec4 (RESPRG ("uitext"), "text_color", widget->label.text_color);
SimpleMesh_render (&quad, false); /* UI always without wireframe. */
/* 1.5 because we want to go forward half of this character and
one character more. */
glm_translate2d (model, (vec2) { 1.5f, 0.0f });
glm_translate2d (model, (vec2) { char_spacing, 0.0 });
p = g_utf8_next_char (p);
}