| OLD | NEW |
| (Empty) |
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 2 <!-- =====================================================================--> | |
| 3 <!-- fonts-fontface-01-t.svg --> | |
| 4 <!-- --> | |
| 5 <!-- Test the CSS2 font-maching algorithm against a set of SVG fonts. --> | |
| 6 <!-- --> | |
| 7 <!-- Author : Craig Northway --> | |
| 8 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/
SVG/1.1/DTD/svg11-tiny.dtd"> | |
| 9 | |
| 10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" vie
wBox="0 0 480 360"> | |
| 11 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/descrip
tion/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewer="CN
" owner="CN" desc="Test the CSS2 font-maching algorithm against a set of SVG fon
ts." status="accepted" version="$Revision: 1.4 $" testname="$RCSfile: fonts-desc
-02-t.svg,v $"> | |
| 12 <OperatorScript> | |
| 13 <Paragraph> | |
| 14 This tests the behaviour of CSS font matching based on font-vari
ant attribute. | |
| 15 </Paragraph> | |
| 16 <Paragraph> | |
| 17 The first line of text should be 'square' 'triangle'. The small-
caps font should | |
| 18 match the second text element. | |
| 19 </Paragraph> | |
| 20 <Paragraph> | |
| 21 The second line of text should be 'square' 'triangle'. The secon
d line is used | |
| 22 to ensure that the order of font specification does not effect t
he selection | |
| 23 of these fonts. | |
| 24 </Paragraph> | |
| 25 <Paragraph> | |
| 26 The third line of text should be 'square', 'diamond', 'square',
'diamond'. This | |
| 27 shows that the correct font is selected when a font in the list
does not support | |
| 28 the variant required. Note that the fonts provide no x-height so
scaling | |
| 29 (allowed by CSS) cannot be used to simulate a small cap from a r
egular font. | |
| 30 </Paragraph> | |
| 31 <Paragraph> | |
| 32 The last line of test can be 'square', 'a', 'a' (from a fallback
font), | |
| 33 'diamond'. The first 'a' | |
| 34 can be replaced with a smallcaps 'A', if there is a smallcaps fo
nt installed | |
| 35 or if synthesis is supported. | |
| 36 </Paragraph> | |
| 37 </OperatorScript> | |
| 38 </SVGTestCase> | |
| 39 <g id="test-body-content"> | |
| 40 <defs > | |
| 41 <font horiz-adv-x="500"> | |
| 42 <font-face font-family="SVGFont1" | |
| 43 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 44 <missing-glyph horiz-adv-x="500" | |
| 45 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 46 <glyph unicode=" " glyph-name="space"/> | |
| 47 <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750
L0 750Z"/> | |
| 48 </font> | |
| 49 | |
| 50 <font horiz-adv-x="500"> | |
| 51 <font-face font-family="SVGFont1" font-variant="small-caps" | |
| 52 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 53 <missing-glyph horiz-adv-x="500" | |
| 54 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 55 <glyph unicode=" " glyph-name="space"/> | |
| 56 <glyph unicode="a" glyph-name="upward-triangle" d="M0 0L500 0L25
0 900Z"/> | |
| 57 </font> | |
| 58 | |
| 59 | |
| 60 <font horiz-adv-x="500"> | |
| 61 <font-face font-family="SVGFont2" font-variant="small-caps" | |
| 62 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 63 <missing-glyph horiz-adv-x="500" | |
| 64 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 65 <glyph unicode=" " glyph-name="space"/> | |
| 66 <glyph unicode="a" glyph-name="upward-triangle" d="M0 0L500 0L25
0 900Z"/> | |
| 67 </font> | |
| 68 | |
| 69 <font horiz-adv-x="500"> | |
| 70 <font-face font-family="SVGFont2" | |
| 71 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 72 <missing-glyph horiz-adv-x="500" | |
| 73 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 74 <glyph unicode=" " glyph-name="space"/> | |
| 75 <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750
L0 750Z"/> | |
| 76 </font> | |
| 77 | |
| 78 | |
| 79 <font horiz-adv-x="500"> | |
| 80 <font-face font-family="SVGFont4" font-variant="normal" | |
| 81 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 82 <missing-glyph horiz-adv-x="500" | |
| 83 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 84 <glyph unicode=" " glyph-name="space"/> | |
| 85 <glyph unicode="a" glyph-name="square" d="M0 250L500 250L500 750
L0 750Z"/> | |
| 86 </font> | |
| 87 | |
| 88 <font horiz-adv-x="500"> | |
| 89 <font-face font-family="SVGFont5" font-variant="small-caps" | |
| 90 units-per-em="1000" ascent="800" descent="200" alphabetic="2
00" /> | |
| 91 <missing-glyph horiz-adv-x="500" | |
| 92 d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450 50Z"/
> | |
| 93 <glyph unicode=" " glyph-name="space"/> | |
| 94 <glyph unicode="a" glyph-name="diamond" | |
| 95 d="M0 500L250 250L500 500L250 750Z"/> | |
| 96 </font> | |
| 97 | |
| 98 </defs> | |
| 99 | |
| 100 <g font-size="30"> | |
| 101 <!-- This should produce a square followed by a triangle --> | |
| 102 <text x="50" y="50" font-family="SVGFont1">a</text> | |
| 103 <text x="100" y="50" font-family="SVGFont1" font-variant="small-caps">a<
/text> | |
| 104 | |
| 105 <!-- This should produce a square followed by a triangle --> | |
| 106 <text x="50" y="100" font-family="SVGFont2">a</text> | |
| 107 <text x="100" y="100" font-family="SVGFont2" font-variant="small-caps">a
</text> | |
| 108 | |
| 109 <!-- This should produce a square, diamond, square, diamond. --> | |
| 110 <text x="50" y="150" font-family="SVGFont5,SVGFont4" font-variant="norma
l">a</text> | |
| 111 <text x="100" y="150" font-family="SVGFont5,SVGFont4" font-variant="smal
l-caps">a</text> | |
| 112 <text x="150" y="150" font-family="SVGFont4,SVGFont5" font-variant="norm
al">a</text> | |
| 113 <text x="200" y="150" font-family="SVGFont4,SVGFont5" font-variant="smal
l-caps">a</text> | |
| 114 | |
| 115 <!-- | |
| 116 This should produce a square, 'a', 'a', diamond. Or a small-caps ver
sion of the 'A' | |
| 117 instead of the first lower-case 'a' if synethesis is supported | |
| 118 --> | |
| 119 <text x="50" y="200" font-family="SVGFont4" font-variant="normal">a</tex
t> | |
| 120 <text x="100" y="200" font-family="SVGFont4" font-variant="small-caps">a
</text> | |
| 121 <text x="150" y="200" font-family="SVGFont5" font-variant="normal">a</te
xt> | |
| 122 <text x="200" y="200" font-family="SVGFont5" font-variant="small-caps">a
</text> | |
| 123 </g> | |
| 124 </g> | |
| 125 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black"
>$Revision: 1.4 $</text> | |
| 126 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" strok
e="#000000"/> | |
| 127 </svg> | |
| OLD | NEW |