textpath-selection-011-ref.html (1370B)
1 <!DOCTYPE html> 2 3 <meta charset="UTF-8"> 4 5 <title>CSS Reftest Reference</title> 6 7 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> 8 9 <meta content="svg" name="flags"> 10 11 <style> 12 text 13 { 14 background-color: transparent; 15 /* 16 color suppresses UA default background-color, 17 but fill and stroke do not, so set explicitly 18 */ 19 fill: green; 20 /* 21 fill is the shorthand form for fill-color, 22 fill-image, fill-origin, fill-position, fill-size 23 and fill-repeat 24 https://www.w3.org/TR/fill-stroke-3/#fill-shorthand 25 */ 26 stroke: yellow; 27 /* 28 stroke is the shorthand form for stroke-color, 29 stroke-image, stroke-origin, stroke-position, 30 stroke-size, and stroke-repeat 31 https://www.w3.org/TR/fill-stroke-3/#stroke-shorthand 32 */ 33 stroke-width: 2px; 34 } 35 </style> 36 37 <p>Test passes if the glyphs of "Curvy text sample" are green with a yellow outline. 38 39 <div> 40 41 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="550" height="300"> 42 43 <path id="pathToApply" 44 d="M 100 200 45 C 100 100 200 0 500 200" fill="none" /> 46 47 <text style="font-size: 48px;"><textPath xlink:href="#pathToApply" id="test">Curvy text sample</textPath></text> 48 49 </svg> 50 51 </div>