aboutsummaryrefslogtreecommitdiff
path: root/src/shape.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-14 20:16:14 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-15 16:49:00 +0100
commitc247f4faa852057d7d59c454d5e532a01e93b080 (patch)
tree45631911944970404b5ddd354761cdf279e2cd61 /src/shape.c
parentd41cf4ce1b1eddc030a85293ca7174e4c36750ce (diff)
Set height and ascent on empty boxes
Diffstat (limited to 'src/shape.c')
-rw-r--r--src/shape.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shape.c b/src/shape.c
index 3453e59..4518821 100644
--- a/src/shape.c
+++ b/src/shape.c
@@ -101,7 +101,8 @@ static void add_wrap_box(gpointer vi, gpointer vb)
static void add_nothing_box(struct wrap_line *line, SCBlock *scblock,
- int editable, enum wrap_box_space sp)
+ int editable, enum wrap_box_space sp,
+ SCInterpreter *scin)
{
struct wrap_box *box;
@@ -117,8 +118,8 @@ static void add_nothing_box(struct wrap_line *line, SCBlock *scblock,
box->offs_char = 0;
box->space = sp;
box->width = 0;
- box->ascent = 0;
- box->height = 0;
+ box->ascent = sc_interp_get_ascent(scin);
+ box->height = sc_interp_get_height(scin);
box->filename = NULL;
box->editable = editable;
line->n_boxes++;
@@ -180,7 +181,7 @@ static int add_wrap_boxes(struct wrap_line *line, const char *text,
//printf("adding '%s'\n", swizzle(text+offs, len));
while ( len==0 ) {
- add_nothing_box(line, bl, editable, space);
+ add_nothing_box(line, bl, editable, space, scin);
return 0;
}