aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sc_interp.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c
index 70317a6..35531b6 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -342,6 +342,24 @@ static void set_bold(SCInterpreter *scin)
}
+static void set_oblique(SCInterpreter *scin)
+{
+ struct sc_state *st = &scin->state[scin->j];
+ copy_top_fontdesc(scin);
+ pango_font_description_set_style(st->fontdesc, PANGO_STYLE_OBLIQUE);
+ update_font(scin);
+}
+
+
+static void set_italic(SCInterpreter *scin)
+{
+ struct sc_state *st = &scin->state[scin->j];
+ copy_top_fontdesc(scin);
+ pango_font_description_set_style(st->fontdesc, PANGO_STYLE_ITALIC);
+ update_font(scin);
+}
+
+
/* This sets the colour for the font at the top of the stack */
static void set_colour(SCInterpreter *scin, const char *colour)
{
@@ -942,6 +960,16 @@ int sc_interp_add_blocks(SCInterpreter *scin, SCBlock *bl)
set_bold(scin);
maybe_recurse_after(scin, child);
+ } else if ( strcmp(name, "oblique") == 0 ) {
+ maybe_recurse_before(scin, child);
+ set_oblique(scin);
+ maybe_recurse_after(scin, child);
+
+ } else if ( strcmp(name, "italic") == 0 ) {
+ maybe_recurse_before(scin, child);
+ set_italic(scin);
+ maybe_recurse_after(scin, child);
+
} else if ( strcmp(name, "fgcol") == 0 ) {
maybe_recurse_before(scin, child);
set_colour(scin, options);