From c6abe4626c40d4925d6233cf0ca1c30cd49a22cd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 14 Sep 2019 23:45:38 +0200 Subject: Handle *bold* in parser, rather than as a separate stage --- libstorycode/narrative_priv.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libstorycode/narrative_priv.h') diff --git a/libstorycode/narrative_priv.h b/libstorycode/narrative_priv.h index 86aa612..c783df2 100644 --- a/libstorycode/narrative_priv.h +++ b/libstorycode/narrative_priv.h @@ -42,6 +42,13 @@ enum narrative_item_type }; +struct narrative_text_run +{ + enum narrative_run_type type; + char *text; +}; + + struct narrative_item { enum narrative_item_type type; @@ -60,13 +67,11 @@ struct narrative_item * obj_w + space_l + space_r might be less than width of rendering surface */ /* For TEXT, BP, PRESTITLE */ - char *text; + int n_runs; + struct narrative_text_run *runs; enum alignment align; #ifdef HAVE_PANGO PangoLayout *layout; - char *layout_text; - int *chars_removed; - int n_chars_removed; #else void *layout; #endif -- cgit v1.2.3