Skip to content

Instantly share code, notes, and snippets.

@iamstarkov
Created May 15, 2012 20:17
Show Gist options
  • Save iamstarkov/2704795 to your computer and use it in GitHub Desktop.
Save iamstarkov/2704795 to your computer and use it in GitHub Desktop.
Text masking — The SVG way
/**
* Text masking — The SVG way
*/
svg {
width: 6em; height: 1.5em;
font: 900 500%/1.2 'Arial Black', sans-serif;
}
text { fill: url(#wood); }
<svg>
<defs>
<pattern id="wood" patternUnits="userSpaceOnUse" width="400" height="400" >
<image xlink:href="http://subtlepatterns.com/patterns/purty_wood.png" width="400" height="400" />
</pattern>
</defs>
<text y="1.2em">SVG rocks!</text>
</svg>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment