| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 3 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ====================================================================== --> |
| 24 |
<!-- Tests various altGlyph uses --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected]. --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 30 |
|
| 31 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500" |
| 32 |
xmlns="http://www.w3.org/2000/svg" |
| 33 |
xmlns:xlink="http://www.w3.org/1999/xlink" > |
| 34 |
<title>SVGFont - Text/Font Bounds computation.</title> |
| 35 |
|
| 36 |
<text class="title" x="50%" y="40" |
| 37 |
>SVGFont - Text/Font Bounds computation.</text> |
| 38 |
|
| 39 |
<font horiz-adv-x="150"> |
| 40 |
<font-face |
| 41 |
font-family="FOPFont" |
| 42 |
units-per-em="250" |
| 43 |
ascent="200" |
| 44 |
descent="50" |
| 45 |
alphabetic="0"/> |
| 46 |
|
| 47 |
<missing-glyph horiz-adv-x="150" d="M20 0 V240 H100 V0 z"/> |
| 48 |
|
| 49 |
<glyph unicode=" " glyph-name=" " horiz-adv-x="100"/> |
| 50 |
|
| 51 |
<glyph unicode="F" glyph-name="F" horiz-adv-x="100"> |
| 52 |
<path style="fill:none;stroke-width:25; stroke-linecap:square" |
| 53 |
d="M13,0 v162 h80 m-75-87 h50"/> |
| 54 |
</glyph> |
| 55 |
|
| 56 |
<glyph unicode="O" glyph-name="O" horiz-adv-x="130"> |
| 57 |
<ellipse style="fill:none;stroke-width:25" |
| 58 |
cx="63" cy="82" rx="40" ry="82"/> |
| 59 |
</glyph> |
| 60 |
|
| 61 |
<glyph unicode="P" glyph-name="p" horiz-adv-x="120"> |
| 62 |
<path style="fill:none; stroke-width:25; stroke-linecap:square" |
| 63 |
d="M13,0 v162 h60 a 25,43 0 1 0 0 -86 h-55"/> |
| 64 |
</glyph> |
| 65 |
|
| 66 |
<hkern g1="F" g2="O" k="5"/> |
| 67 |
<hkern g1="O" g2="P" k="4"/> |
| 68 |
</font> |
| 69 |
|
| 70 |
<text x="150" y="200" |
| 71 |
style="stroke:lightgrey;font-family:FOPFont;font-size:120" |
| 72 |
>FOP</text> |
| 73 |
|
| 74 |
<svg x="150" y="201" width="162" height="20"> |
| 75 |
<rect x="0%" y="0%" width="100%" height="100%" fill="#88F"/> |
| 76 |
|
| 77 |
<!-- This svg element is designed to only intersect |
| 78 |
the wide stroke on the text. If it doesn't |
| 79 |
properly include the stroke (from the |
| 80 |
SVG font defn) in the text rendering bounds it will skip |
| 81 |
the text entirely resulting in nothing being drawn on |
| 82 |
top of the rect --> |
| 83 |
<text y="-1" style="stroke:black; font-family:FOPFont; font-size:120" |
| 84 |
>FOP</text> |
| 85 |
</svg> |
| 86 |
|
| 87 |
<text x="225" y="250" class="legend">The bottoms of the letters should |
| 88 |
<tspan x="225" dy="1em">appear in black on top of the blue rect</tspan> |
| 89 |
</text> |
| 90 |
|
| 91 |
</svg> |