-
Notifications
You must be signed in to change notification settings - Fork 6
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
"Not published" badge has too much horizontal padding #85
Comments
Wait, when you say vertical padding, is that horizontal padding? I mean, padding on the left and right? Because the height of the badge is (should be) exactly the same as other badges, 20px. The text font and size is also the same as for other https://shields.io badges: 11pt, DejaVu Sans, Verdana, Geneva, sans-serif. Or maybe the SVG rendering is not right in your browser? If you suspect that this is the case, can you post a PNG screenshot with this and other badges, instead of the SVG? |
Sorry, yes, there's excess padding to the left and right of "not published" |
OK, I think it is better now. Spacing is quite hacky, unfortunately, I am trying to set the width based on a string... |
You might be able to use |
@hadley The SVG is rendered in the browser, with the fonts you have, so imo the only solution is a server side SVG library that converts the text to paths. Then padding will be correct and the SVG will look the same everywhere. I should just look at what shields.io is doing, really.... |
But you're presumably choosing a common font that most browsers have. You can also set the svg |
e.g. http://www.r-pkg.org/badges/version/pkgdown
The text was updated successfully, but these errors were encountered: