Skip to content

Commit 3696d6c

Browse files
committed
return ascent
1 parent e86b52c commit 3696d6c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/material_text.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ struct position {
385385
int y;
386386
int w;
387387
int h;
388+
int ascent;
388389
};
389390

390391
static inline int
@@ -631,6 +632,7 @@ ltext_(lua_State *L, struct position *pos) {
631632
pos->w = 2;
632633
pos->h = ctx.ascent + ctx.decent - gap;
633634
pos->n = pos_n;
635+
pos->ascent = ctx.ascent;
634636
return 0;
635637
}
636638
}
@@ -655,7 +657,8 @@ ltext_position(lua_State *L) {
655657
lua_pushinteger(L, pos.w);
656658
lua_pushinteger(L, pos.h);
657659
lua_pushinteger(L, pos.n);
658-
return 5;
660+
lua_pushinteger(L, pos.ascent);
661+
return 6;
659662
}
660663

661664
static uint32_t

0 commit comments

Comments
 (0)