Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character clipped #2

Open
mdubbs opened this issue Oct 1, 2015 · 2 comments
Open

Character clipped #2

mdubbs opened this issue Oct 1, 2015 · 2 comments
Labels

Comments

@mdubbs
Copy link

mdubbs commented Oct 1, 2015

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

capture

@Bekt
Copy link
Owner

Bekt commented Oct 1, 2015

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 Bekt added the bug label Oct 1, 2015
@Bekt
Copy link
Owner

Bekt commented Oct 1, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants