aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/stylesheet.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-10-10 21:52:21 +0200
committerThomas White <taw@bitwiz.me.uk>2019-10-10 21:52:21 +0200
commitfe64bad2147d1abd20740873886ab95482b7c626 (patch)
tree63e9391233f00751af4dabb557236318bbe92538 /libstorycode/stylesheet.c
parent0243f814940b6f2a02664b5a19ef21e636e2af2e (diff)
Take paraspace into account in cursor calculations
Diffstat (limited to 'libstorycode/stylesheet.c')
-rw-r--r--libstorycode/stylesheet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c
index d649d48..8fa904e 100644
--- a/libstorycode/stylesheet.c
+++ b/libstorycode/stylesheet.c
@@ -588,3 +588,13 @@ int stylesheet_set_from_storycode(Stylesheet *ss, const char *sc)
return 0;
}
+
+
+double lcalc(struct length l, double pd)
+{
+ if ( l.unit == LENGTH_UNIT ) {
+ return l.len;
+ } else {
+ return l.len * pd;
+ }
+}