invatar icon indicating copy to clipboard operation
invatar copied to clipboard

Character clipped

Open mdubbs opened this issue 10 years ago • 2 comments

If you do MW, the W is partially clipped on the right. If I figure it out, I'll PR.

capture

mdubbs avatar Oct 01 '15 18:10 mdubbs

Thanks!

I think W is the widest ascii character, so WW is even worse (http://codepen.io/anon/pen/zvZOrE)

Easy solution would be to decrease the font-size proportion constant in line 23 here.

Future enhancement could be to automatically fit any arbitrary text into the SVG, possibly using text. textLength and/or text.lengthAdjust.

Bekt avatar Oct 01 '15 19:10 Bekt

Could also go fancy and calculate font-size based on SVG size and the number of text characters.

Bekt avatar Oct 01 '15 19:10 Bekt