hi Zhu and Heiko,
from my point of view patterns on stroke are more or less useless. but
one could reach the desired results by overlaying two or more fonts. of
course glyph width and baseline is importantant here and not all kind of
curves can be perfectly "filled" that way. check the code below (could
be nicer with <use> and so on...)
<svg>
<defs>
<font>
<font-face font-family='fontslash' units-per-em="100"
alphabetic="0" />
<missing-glyph horiz-adv-x="100" d="M0,0 l0,0" />
<glyph unicode="w" horiz-adv-x="100" d="M 0,0 h 50 v 50 h -50 z
M 50,-50 h 50 v 50 h -50 z" />
</font>
<font>
<font-face font-family='fontbackslash' units-per-em="100"
alphabetic="0" />
<missing-glyph horiz-adv-x="100" d="M0,0 l0,0" />
<glyph unicode="w" horiz-adv-x="100" d="M 50,0 h 50 v 50 h -50 z
M 0,-50 h 50 v 50 h -50 z" />
</font>
</defs>
<rect x="20" y="100" width="444" height="22" fill="red"/>
<text x="20" y="100" font-family='fontslash'>wwwwwwwwwww</text>
<rect x="20" y="200" width="444" height="22" fill="green"/>
<text x="20" y="200" font-family='fontbackslash'>wwwwwwwwwwwww</text>
<rect x="20" y="300" width="444" height="22" fill="orange"/>
<text x="20" y="300" font-family='fontslash' fill="blue">wwwwwwwwwww</text>
<text x="20" y="300" font-family='fontbackslash'
fill="red">wwwwwwwwwwwww</text>
<path id="myDiagonalPath" d="M 20 350 l 444 222" fill="none" stroke="none"/>
<text font-family='fontslash'>
<textPath xlink:href="#myDiagonalPath">
wwwwwwwwwwwwwwwwwwwww
</textPath>
</text>
<text font-family='fontslash' fill="red" transform="translate(50)">
<textPath xlink:href="#myDiagonalPath">
wwwwwwwwwwwwwwwwwwwww
</textPath>
</text>
<text font-family='fontbackslash' fill="green" transform="translate(50)">
<textPath xlink:href="#myDiagonalPath">
wwwwwwwwwwwwwwwwwwwww
</textPath>
</text>
<path id="MyPath" d="M 30 530 s 50 -50 100 0 s 80 -50 110 0"
style="stroke:blue;fill:none;stroke-width:1" />
<text font-family='fontslash' fill="red" transform="translate(0 50)">
<textPath xlink:href="#MyPath">
wwwwwwwwwwwwwwwwwwwww
</textPath>
</text>
<text font-family='fontbackslash' fill="green" transform="translate(0 50)">
<textPath xlink:href="#MyPath">
wwwwwwwwwwwwwwwwwwwww
</textPath>
</text>
</svg>
andré
--
___________________________________________________________________
andre m. winter,
cartography for internet and multimedia applications
schiessstand 4/1, a6091 goetzens, tyrol, austria
tel.: ++43.5234.32732
email: <[EMAIL PROTECTED]>
<http://www.vectoreal.com/> SVG consulting and development
<http://www.carto.net/> online cartography focusing on SVG
<http://www.carto.at/> print and online touristic map solutions
Heiko Niemann wrote:
>Hi Zhu,
>
>
>--- In [email protected], zhu yang <[EMAIL PROTECTED]> wrote:
>
>
>>Hi, guys
>>
>>I tried to use pattern or symbols instead of the font. My method is
>>
>>
>to use the pattern as the stroke to draw a line. such as
>
>
>>
>><svg>
>><defs>
>><pattern id="test" patternUnits="userSpaceOnUse"
>>x="0" y="0" width="10" height="5" viewBox="0 0 20 10" orient='auto'>
>><path d="M0,0 L10,0 L10,5 L0,5z" fill="white" stroke="none" />
>><path d="M0,5 L10,5 10,10 L0,10z" fill="black" stroke="none" />
>><path d="M10,0 L20,0 L20,5 L10,5z" fill="black" stroke="none" />
>><path d="M10,5 L20,5 L20,10 L10,10z" fill="white" stroke="none" />
>></pattern>
>></defs>
>><g transform="translate(20,20)">
>><rect x="0" y="0" width="100" height="100"
>>style="fill: url(#test); stroke: black;"/>
>></g>
>><g transform="translate(120,20)">
>><path d="M 100 100 L 300 300" fill="none" stroke="url(#test)"
>>
>>
>stroke-width="6"/>
>
>
>></g>
>></svg>
>>
>>
>>However, the pattern seems only work on horizental line. I think
>>
>>
>unlike the marker, the pattern has no orient="auto" parameter to
>rotate the patttern along path automatically. Do you think it is
>possible to reach the same result as with font?
>
>
>
>no that's not possible.
>
>Regards,
>
>Heiko
>
>
>
>
>
>
>-----
>To unsubscribe send a message to: [EMAIL PROTECTED]
>-or-
>visit http://groups.yahoo.com/group/svg-developers and click "edit my
>membership"
>----
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/