summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-24 13:46:44 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-24 13:46:44 (GMT)
commitc873384e1376ac80408a15d7e83fa1fb3539a28f (patch)
treed80cd89f85642d5824fdde445a71da5e90c26005 /gfx
parente9d9db519f29a9a0262089af0e2b8cd4514abacd (diff)
downloadeeshow-c873384e1376ac80408a15d7e83fa1fb3539a28f.zip
eeshow-c873384e1376ac80408a15d7e83fa1fb3539a28f.tar.gz
eeshow-c873384e1376ac80408a15d7e83fa1fb3539a28f.tar.bz2
gfx/cro.c (overlined): don't draw false overline if string ends with tilde
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cro.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gfx/cro.c b/gfx/cro.c
index 3ff5d2e..637d3fb 100644
--- a/gfx/cro.c
+++ b/gfx/cro.c
@@ -302,12 +302,13 @@ static void overlined(cairo_t *cr, const char *s, double h)
assert(g == glyphs + num_glyphs);
assert(g > glyphs);
- if (last != g)
+ if (last != g) {
cairo_show_glyphs(cr, last, g - last);
- if (overlining) {
- cairo_glyph_extents(cr, g - 1, 1, &ext);
- overline(cr, ox, oy, g[-1].x + ext.x_advance,
- g[-1].y + ext.y_advance, h);
+ if (overlining) {
+ cairo_glyph_extents(cr, g - 1, 1, &ext);
+ overline(cr, ox, oy, g[-1].x + ext.x_advance,
+ g[-1].y + ext.y_advance, h);
+ }
}
cairo_glyph_free(glyphs);