Created
October 9, 2013 08:47
-
-
Save starstuck/6898242 to your computer and use it in GitHub Desktop.
Svg text outline using filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="40"> | |
| <defs> | |
| <filter id="outlineFilter"> | |
| <feMorphology in="SourceAlpha" operator="dilate" radius="2" result="outline" /> | |
| <feFlood flood-color="white" result="chroma"/> | |
| <feComposite in="chroma" in2="outline" operator="in" result="glow" /> | |
| <feMerge> | |
| <feMergeNode in="glow" /> | |
| <feMergeNode in="SourceGraphic" /> | |
| </feMerge> | |
| </filter> | |
| </defs> | |
| <text class="outline-text" x="10" y="30" font-size="16px" filter="url(#outlineFIlter)">Some text</text> | |
| </svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment