|
1581 | 1581 |
|
1582 | 1582 | if (fo_g.property('_scale')) { |
1583 | 1583 | var box = painter.GetBoundarySizes(fo_g.node()); |
1584 | | - painter.TextScaleFactor(1.* box.width / parseInt(fo_g.attr('width')), draw_g); |
| 1584 | + painter.TextScaleFactor(1.05* box.width / parseInt(fo_g.attr('width')), draw_g); |
1585 | 1585 | painter.TextScaleFactor(1.* box.height / parseInt(fo_g.attr('height')), draw_g); |
1586 | 1586 | } |
1587 | 1587 | }); |
1588 | 1588 |
|
1589 | 1589 | // adjust font size |
1590 | 1590 | var f = draw_g.property('text_factor'); |
| 1591 | + |
1591 | 1592 | var font = draw_g.property('text_font'); |
1592 | 1593 | if ((f>0) && ((f<0.9) || (f>1.))) { |
1593 | 1594 | font.size = Math.floor(font.size/f); |
|
1708 | 1709 | if (scale) txt.classed('hidden_text',true).attr('opacity','0'); // hide rescale elements |
1709 | 1710 |
|
1710 | 1711 | if (box.width > draw_g.property('max_text_width')) draw_g.property('max_text_width', box.width); |
1711 | | - if ((w>0) && scale) this.TextScaleFactor(1.*box.width / w, draw_g); |
| 1712 | + if ((w>0) && scale) this.TextScaleFactor(1.05*box.width / w, draw_g); |
1712 | 1713 | if ((h>0) && scale) this.TextScaleFactor(1.*box.height / h, draw_g); |
1713 | 1714 |
|
1714 | 1715 | return box.width; |
|
2824 | 2825 | for (var n = 0; n < 2; ++n) |
2825 | 2826 | sumw += this.DrawText((n == 0) ? "start" : "end", |
2826 | 2827 | margin_x, posy, width-2*margin_x, stepy, parts[n], jcolor); |
2827 | | - this.TextScaleFactor(sumw/(width-2*margin_x), this.draw_g); |
| 2828 | + this.TextScaleFactor(1.05*sumw/(width-2*margin_x), this.draw_g); |
2828 | 2829 | } |
2829 | 2830 | } else { |
2830 | 2831 | this.DrawText(pavetext['fTextAlign'], margin_x, posy, width-2*margin_x, stepy, lines[j], jcolor); |
|
0 commit comments