-
|
The Shields Specification currently says:
However, if I request a badge from Shields.io I currently get the following font stack: Can someone, please, explain why the Shields.io output doesn't match the specification? Steps to Reproduce
Observed Behavior
<svg xmlns="http://www.w3.org/2000/svg" width="106" height="20" role="img" aria-label="downloads: 2.7G"><title>downloads: 2.7G</title><filter id="blur"><feGaussianBlur in="SourceGraphic" stdDeviation="16"/></filter><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="106" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="69" height="20" fill="#555"/><rect x="69" width="37" height="20" fill="#67ac09"/><rect width="106" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="355" y="150" fill="#010101" fill-opacity=".80" filter="url(#blur)" transform="scale(.1)" textLength="590">downloads</text><text aria-hidden="true" x="355" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="590">downloads</text><text x="355" y="140" transform="scale(.1)" fill="#fff" textLength="590">downloads</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".80" filter="url(#blur)" transform="scale(.1)" textLength="270">2.7G</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="270">2.7G</text><text x="865" y="140" transform="scale(.1)" fill="#fff" textLength="270">2.7G</text></g></svg>Expected Behavior
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hello @pavpen 👋🏻 Essentially, Open Sans is not universally available, so we can't use it in badges unless we base64 the font directly in every SVG, or accept that a proportion of users will be rendering a different font, said proportion presumably being significantly higher than those who don't have Verdana. As to why we've kept the specification misaligned with what Shields.io effectively does, here's a related discussion: #225. |
Beta Was this translation helpful? Give feedback.
-
|
In any case, I think it's worth linking this discussion in the "Shields Specification". |
Beta Was this translation helpful? Give feedback.
Hello @pavpen 👋🏻
Essentially, Open Sans is not universally available, so we can't use it in badges unless we base64 the font directly in every SVG, or accept that a proportion of users will be rendering a different font, said proportion presumably being significantly higher than those who don't have Verdana. As to why we've kept the specification misaligned with what Shields.io effectively does, here's a related discussion: #225.