| 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 |
<!-- ====================================================================== --> |
| 25 |
<!-- Tests various text on a path --> |
| 26 |
<!-- --> |
| 27 |
<!-- @author [email protected] --> |
| 28 |
<!-- @version $Id$ --> |
| 29 |
<!-- ====================================================================== --> |
| 30 |
|
| 31 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 32 |
|
| 33 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500" |
| 34 |
xmlns="http://www.w3.org/2000/svg" version="1.2" |
| 35 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 36 |
<title>Test of Text wrapping stuff.</title> |
| 37 |
|
| 38 |
<g id="content" > |
| 39 |
|
| 40 |
<text class="title" x="50%" y="40">Test of Text wrapping stuff</text> |
| 41 |
<!-- Space after size 40 'that' is aci 45 --> |
| 42 |
<rect x="17" y="80" width="200" height="400" fill="rgb(220,220,255)"/> |
| 43 |
<line x1="27" y1="70" x2="27" y2="490" stroke="grey" fill="none"/> |
| 44 |
<line x1="207" y1="70" x2="207" y2="490" stroke="grey" fill="none"/> |
| 45 |
|
| 46 |
<rect x="220" y="80" width="10" height="400" fill="rgb(220,220,255)"/> |
| 47 |
|
| 48 |
<rect x="233" y="80" width="200" height="400" fill="rgb(220,220,255)"/> |
| 49 |
<line x1="243" y1="70" x2="243" y2="490" stroke="grey" fill="none"/> |
| 50 |
<line x1="423" y1="70" x2="423" y2="490" stroke="grey" fill="none"/> |
| 51 |
|
| 52 |
<flowRoot font-size="20"> |
| 53 |
<flowRegion> |
| 54 |
<path d="M 17,80 v400 h200 v-400 z |
| 55 |
M 220,80 v400 h10 v-400 z |
| 56 |
M 233,80 v400 h200 v-400 z" visibility="hidden"/> |
| 57 |
</flowRegion> |
| 58 |
|
| 59 |
<flowDiv> |
| 60 |
<flowPara indent="20" margin-top="10" margin-bottom="10" >This is an <flowSpan font-size="40" fill="crimson">ex­ample</flowSpan> of a very long string that is split ‍across multi­ple lines via text wrap­ping.</flowPara> |
| 61 |
<flowPara text-align="middle" margin-top="10" margin-left="10" margin-right="10" margin-bottom="10"><flowLine>Now check if text wrapping handles a number of tricky</flowLine> situations: a­very­long­runon­word­that­spans­multiple­lines­<flowSpan font-weight="bold">with­<flowSpan fill="crimson">embedded­</flowSpan>span</flowSpan>­elements & <flowSpan fill="green" dy="-.3em" font-size="80%">super</flowSpan><flowSpan dy=".3em"> or </flowSpan><flowSpan fill="darkgreen" dy=".3em" font-size="80%">sub</flowSpan><flowSpan dy="-.3em"> scripts.</flowSpan></flowPara> |
| 62 |
<flowPara margin-top="10" text-align="end">Now we are just <flowSpan font-size="30" fill="blue">about</flowSpan> to go to the next flow rect <flowSpan font-size="10">(note if the 'about' were included on the last line of the previous flow rect the line would not have fit and the whole line would have moved here).</flowSpan></flowPara> |
| 63 |
<flowPara margin="10" text-align="full"> I'll keep going because I want to make sure that it properly stops when it hits the end of all of the the flow regions defined. Also the last line includes text in a larger font size so it will not fit. Thus the end of this sentence will be cut off because the line size gets <flowSpan font-size="35">tall</flowSpan>er</flowPara> |
| 64 |
</flowDiv> |
| 65 |
</flowRoot> |
| 66 |
</g> |
| 67 |
|
| 68 |
<!-- ============================================================= --> |
| 69 |
<!-- Batik sample mark --> |
| 70 |
<!-- ============================================================= --> |
| 71 |
<use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| 72 |
</svg> |