Skip to content

Instantly share code, notes, and snippets.

Last active February 9, 2016 00:45
What would you like to do?
Poor Anti-Aliasing in SVG, #1
1,920 contiguous opaque <tt>svg:rect</tt> elements, each .5-pixel wide. The text underneath the rects should not be visible.
<!DOCTYPE html>
<meta charset="utf-8">
rect {
fill: steelblue;
text {
font: 300 48px "Helvetica Neue";
<script src="//"></script>
var svg ="body").append("svg")
.attr("width", 960)
.attr("height", 500);
.attr("x", 480)
.attr("y", 250)
.attr("text-anchor", "middle")
.attr("dy", ".35em")
.text("TEST FAILED");
.attr("x", function(d) { return d / 2; })
.attr("width", .5)
.attr("height", 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment