1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-10-04 07:46:01 +03:00

sch2fig/cairo.c (cr_text_width): add 5%

Cairo seems to underestimate the width a little, as evidenced by G_LEFT_PASS
in test.sch
This commit is contained in:
Werner Almesberger 2016-08-01 10:58:50 -03:00
parent 15bab1c163
commit c50e7116cf

View File

@ -223,7 +223,7 @@ static unsigned cr_text_width(void *ctx, const char *s, unsigned size)
cairo_set_font_size(cc->cr, cx(cc, size) * TEXT_STRETCH);
cairo_text_extents(cc->cr, s, &ext);
return xc(cc, ext.width);
return xc(cc, ext.width) * 1.05; /* @@@ Cairo seems to underestimate */
}