Stroke styles

57 views
Skip to first unread message

Sam Bull

unread,
Jan 1, 2018, 4:59:03 AM1/1/18
to KanjiVG
Are the different stroke styles available as part of this project? As in, there are 3 different stroke styles, which could be called: dead-stop, fade-out and bounce-back. Looking at 06708.svg (月), I can see the bounce-back style of the second stroke is rendered with an additional part of the path at the end. But, the first stroke should be a fade-out stroke, but is rendered the same way as the other strokes (which are dead-stop).

Ulrich Apel

unread,
Jan 1, 2018, 11:47:42 AM1/1/18
to kan...@googlegroups.com
The data should contain information about stroke types according to the Unicode block "CJK Strokes" (http://www.unicode.org/charts/PDF/U31C0.pdf), for example ㇑, U+31D1 for horizontal stroke with "dead-stop ending", ㇚, U+31DA for horizontal stroke with "bounce-back" or hane in Japanese and ㇓, U+31D3 for for horizontal stroke with "fade-out" and so on. The first stroke in 月 fades out in its single kanji form. As element of other kanji, it normally ends in a dead-stop.

Most rendering of the KanjVG uses the same stroke widths. In a paper at SVG Open 2004 Julien Quint and I presented an approach with changing stroke width for nicer rendering: http://www.svgopen.org/2004/papers/svgopen/ figure 8, last example.

I am not a programmer, so I made this proof of concept by hand. It also can be animated rather nicely in SVG. One could use such an approach for nicer rendering of stroke ends, but there would be other approaches, too. There are also animations of KanjiVG which slow down dead-stop ending and leave "hane" and "fade out" fast.

> Am 24.12.2017 um 00:55 schrieb Sam Bull <dreams...@gmail.com>:
>
> Are the different stroke styles available as part of this project? As in, there are 3 different stroke styles, which could be called: dead-stop, fade-out and bounce-back. Looking at 06708.svg (月), I can see the bounce-back style of the second stroke is rendered with an additional part of the path at the end. But, the first stroke should be a fade-out stroke, but is rendered the same way as the other strokes (which are dead-stop).
>
> --
> --
> You received this message because you are subscribed to the "KanjiVG" group.
> For options and unsubscribing, visit this group at
> http://groups.google.com/group/kanjivg
> ---
> You received this message because you are subscribed to the Google Groups "KanjiVG" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kanjivg+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sam Bull

unread,
Jan 10, 2018, 7:57:14 AM1/10/18
to KanjiVG
On Monday, 1 January 2018 16:47:42 UTC, Ulrich wrote:
Most rendering of the KanjVG uses the same stroke widths.  In a paper at SVG Open 2004 Julien Quint and I presented an approach with changing stroke width for nicer rendering:   http://www.svgopen.org/2004/papers/svgopen/  figure 8, last example.
 
I had a little play around, and managed to add a very basic rendering that might suggest a fadeout stroke.
Basically, at the top of the SVG file I added:

<defs>
    <marker id="fadeout" viewBox="0 0 10 3" refY="1.5" orient="auto">
        <path d="M 0 0 L 10 2 L 0 3 z" />
    </marker>
</defs>

Then, on any stroke that should end with a fadeout, just add this attribute:
marker-end="url(#fadeout)"

This adds the visual information, and I don't think it looks any worse than the bounce back rendering.

Example attached. (Unfortunately, it doesn't seem to work on my phone's browser, but elsewhere seems to be fine).
06708.svg
Reply all
Reply to author
Forward
0 new messages