1 parent e86b52c commit 3696d6cCopy full SHA for 3696d6c
1 file changed
src/material_text.c
@@ -385,6 +385,7 @@ struct position {
385
int y;
386
int w;
387
int h;
388
+ int ascent;
389
};
390
391
static inline int
@@ -631,6 +632,7 @@ ltext_(lua_State *L, struct position *pos) {
631
632
pos->w = 2;
633
pos->h = ctx.ascent + ctx.decent - gap;
634
pos->n = pos_n;
635
+ pos->ascent = ctx.ascent;
636
return 0;
637
}
638
@@ -655,7 +657,8 @@ ltext_position(lua_State *L) {
655
657
lua_pushinteger(L, pos.w);
656
658
lua_pushinteger(L, pos.h);
659
lua_pushinteger(L, pos.n);
- return 5;
660
+ lua_pushinteger(L, pos.ascent);
661
+ return 6;
662
663
664
static uint32_t
0 commit comments