summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 10:27:54 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 10:30:02 -0300
commit69b0d987110ea80237d1896a05bbd3c4c3c80b08 (patch)
tree17dd6de6aae0d02af5edb264c0a6f1f283ca6438 /gfx
parenta8f59fa1ed7d91b82a57b7cd7b31159f74835fa0 (diff)
downloadeeshow-69b0d987110ea80237d1896a05bbd3c4c3c80b08.tar.gz
eeshow-69b0d987110ea80237d1896a05bbd3c4c3c80b08.tar.bz2
eeshow-69b0d987110ea80237d1896a05bbd3c4c3c80b08.zip
undocumented option -O to disable overline drawing (in case it crashes)
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cro.c3
-rw-r--r--gfx/cro.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/gfx/cro.c b/gfx/cro.c
index fae138b..bb06a48 100644
--- a/gfx/cro.c
+++ b/gfx/cro.c
@@ -45,6 +45,7 @@
bool use_pango = 0;
+bool disable_overline = 0;
struct cro_ctx {
@@ -319,7 +320,7 @@ static void cr_text_cairo(void *ctx, int x, int y, const char *s, unsigned size,
BUG("invalid alignment %d", align);
}
- if (strchr(s, '~'))
+ if (!disable_overline && strchr(s, '~'))
overlined(cc->cr, s, cd(cc, size) * TEXT_STRETCH);
else
cairo_show_text(cc->cr, s);
diff --git a/gfx/cro.h b/gfx/cro.h
index 1f2e829..50a5ee3 100644
--- a/gfx/cro.h
+++ b/gfx/cro.h
@@ -26,6 +26,7 @@ struct cro_ctx;
extern bool use_pango;
+extern bool disable_overline;
extern const struct gfx_ops cro_png_ops;
extern const struct gfx_ops cro_pdf_ops;