aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/stylesheet.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-02-25 21:54:40 +0100
committerThomas White <taw@bitwiz.me.uk>2019-02-25 22:16:19 +0100
commit52d08227913e4cbbc593ed2ccb066ee29e4e33c9 (patch)
tree68d758a390c7555b229cf704339b5b6163a2b835 /libstorycode/stylesheet.c
parentb9c16eb6d903ab809b340d404139dcaa1872ea9c (diff)
Use text alignment
Diffstat (limited to 'libstorycode/stylesheet.c')
-rw-r--r--libstorycode/stylesheet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c
index 142d8a7..4d650c1 100644
--- a/libstorycode/stylesheet.c
+++ b/libstorycode/stylesheet.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
+#include <assert.h>
#include "stylesheet.h"
@@ -69,6 +70,7 @@ static void default_style(struct style *s)
s->geom.h.unit = LENGTH_FRAC;
s->font = strdup("Sans 12");
+ s->alignment = ALIGN_LEFT;
s->fgcol[0] = 0.0;
s->fgcol[1] = 0.0;
@@ -227,6 +229,7 @@ int stylesheet_set_alignment(Stylesheet *s, enum style_element el, enum alignmen
{
struct style *sty = get_style(s, el);
if ( sty == NULL ) return 1;
+ assert(align != ALIGN_INHERIT);
sty->alignment = align;
return 0;
}