aboutsummaryrefslogtreecommitdiff
path: root/src/tsar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tsar.c')
-rw-r--r--src/tsar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tsar.c b/src/tsar.c
index ae54107..b84c252 100644
--- a/src/tsar.c
+++ b/src/tsar.c
@@ -131,7 +131,7 @@ void draw_text(const char* text, int x, int y) {
}
void draw_comp_set(float pos_ratio, comp_t **set, int size) {
- int width = 0;
+ int width = (size - 1) * comp_gap;
for (int i = 0; i < size; i++) {
comp_t *comp = set[i];
width += font->max_advance_width * utf8_strlen(comp->data);
@@ -146,6 +146,7 @@ void draw_comp_set(float pos_ratio, comp_t **set, int size) {
draw_text(comp->data, x, y);
x += font->max_advance_width * utf8_strlen(comp->data);
+ x += comp_gap;
}
}