New format RC1

21 views
Skip to first unread message

Alexandre Courbot

unread,
Jun 5, 2011, 7:33:45 AM6/5/11
to KanjiVG
Hi everybody,

Finally, after a lot of struggle, I have something to show you about
the KanjiVG unification task I wanted to get done since some time ago.
I think it brings several serious improvements that make it really
worth it. Notably, the fact that the kanji description and SVG paths
are now merged into a single file instead of being split into two
different ones makes it much less likely that we will run into
inconsistencies between layout and description as was too often the
case before. Also, the fact that the format is 100% SVG compliant
makes it easier for people to tackle our work and to contribute.

If you want to have a look at this, please download the following file:

http://kanjivg.tagaini.net/upload/Main/kanjivg-20110605.zip

Unzip it and have a look at the kanjivg/ directory. You will find one
file per kanji (named after their unicode) and kanji variant, which
you can either open using a text editor or using a SVG viewer like
inkscape. This is just a snapshot of what would end in the git
repository - for releases, I still plan to have one single file that
concatenates all this information (of course, it won't be
SVG-compliant). I also tried to preserve the numbering location
information in a separate SVG group, so that people can easily skip it
if they don't need it. A description of the format can be found here:

http://kanjivg.tagaini.net/Main/Format

Format information (like stroke thickness or font size) can easily be
discarded as well, but it there to provide a decent experience with
SVG viewers. Also, each group and stroke has a unique id to allow HTML
viewers/editors to easily reference them (for example, in order to
provide dynamic highlighting using Javascript).

Your comments and thoughts are welcome. I would like to stabilize this
format as the official kanjivg format in the next few weeks, so please
don't hesitate to speak up and give your opinion about what could be
improved.

Alex.
PS: this format will also make the current site obsolete, so if anyone
wants to take over or help a little bit (we would for instance need a
DHTML online viewer), please feel free to raise your hand! :p

Akeru

unread,
Jun 5, 2011, 9:08:47 AM6/5/11
to KanjiVG
Hi Alex,

> http://kanjivg.tagaini.net/upload/Main/kanjivg-20110605.zip

This link seems broken to me.

> PS: this format will also make the current site obsolete, so if anyone
> wants to take over or help a little bit (we would for instance need a
> DHTML online viewer), please feel free to raise your hand! :p

Raising my hand, making webpages is part of my daytime job so I think
I can help here,

Axel.

Luis Felipe López Acevedo

unread,
Jun 5, 2011, 9:00:47 AM6/5/11
to kan...@googlegroups.com
2011/6/5 Alexandre Courbot <gnu...@gmail.com>

Hi everybody,

Finally, after a lot of struggle, I have something to show you about
the KanjiVG unification task I wanted to get done since some time ago.
I think it brings several serious improvements that make it really
worth it. Notably, the fact that the kanji description and SVG paths
are now merged into a single file instead of being split into two
different ones makes it much less likely that we will run into
inconsistencies between layout and description as was too often the
case before. Also, the fact that the format is 100% SVG compliant
makes it easier for people to tackle our work and to contribute.

If you want to have a look at this, please download the following file:

http://kanjivg.tagaini.net/upload/Main/kanjivg-20110605.zip


Sounds great! The link returns an "Error 404", tho.
 
Unzip it and have a look at the kanjivg/ directory. You will find one
file per kanji (named after their unicode) and kanji variant, which
you can either open using a text editor or using a SVG viewer like
inkscape. This is just a snapshot of what would end in the git
repository - for releases, I still plan to have one single file that
concatenates all this information (of course, it won't be
SVG-compliant). I also tried to preserve the numbering location
information in a separate SVG group, so that people can easily skip it
if they don't need it. A description of the format can be found here:

http://kanjivg.tagaini.net/Main/Format

Format information (like stroke thickness or font size) can easily be
discarded as well, but it there to provide a decent experience with
SVG viewers. Also, each group and stroke has a unique id to allow HTML
viewers/editors to easily reference them (for example, in order to
provide dynamic highlighting using Javascript).

Your comments and thoughts are welcome. I would like to stabilize this
format as the official kanjivg format in the next few weeks, so please
don't hesitate to speak up and give your opinion about what could be
improved.

Alex.
PS: this format will also make the current site obsolete, so if anyone
wants to take over or help a little bit (we would for instance need a
DHTML online viewer), please feel free to raise your hand! :p


I made a demo of a kanji viewer* to help myself learn kanji writing. I made it before I knew about kanjivg so it uses videos. The files for the viewer are in the public domain. If you find something useful to copy from there, feel free to do it.**

And thanks for working on KanjiVG, I'm planning to use it in the future.


* http://nihongokit.tuxfamily.org/
** https://bitbucket.org/sirgazil/nihongokit/
 
--
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



--
Luis Felipe López Acevedo
IntrosMedia

Alexandre Courbot

unread,
Jun 5, 2011, 8:24:17 PM6/5/11
to kan...@googlegroups.com
> This link seems broken to me.

Apologies. The correct link is
http://kanjivg.tagaini.net/upload/Main/kanjivg-ng-20110605.zip

> Raising my hand, making webpages is part of my daytime job so I think
> I can help here,

Owww. If you can do JS and Canvas stuff too, I think we can really
come with something nice. Let's discuss this further!

Alex.

Alexandre Courbot

unread,
Jun 5, 2011, 8:25:06 PM6/5/11
to kan...@googlegroups.com
> I made a demo of a kanji viewer* to help myself learn kanji writing. I made
> it before I knew about kanjivg so it uses videos. The files for the viewer
> are in the public domain. If you find something useful to copy from there,
> feel free to do it.**

Really nice. Which data did you use to generate these animations?

Alex.

Axel Bodart

unread,
Jun 6, 2011, 2:04:26 AM6/6/11
to kan...@googlegroups.com
If you can do JS and Canvas stuff too

Yes I can :-)

Let's discuss this further!

Sure ! I started thinking about it when I saw your first post. I agree with what has been said about SVG support in browsers but same goes for canvas, with the added issue that the canvas element is not designed to interact with the DOM (either of a webpage or of the svg content). It simply gives a surface on which you can paint, that's it. The good point of canvas is the hype that surounds it, while nobody cares much about SVG anymore.

The very nice perl viewer took the decision to render the svg using image file (png), this pretty much solves all the compatibility issues but also hinder a lot the amount of interactivity that can be used. I guess it all depends on what should be displayed. Denshi-Jisho went for a simple stroke-by-stroke display (http://jisho.org/kanji/details/%E6%9D%B1),  using png files, the biggest issue being the amount of generated files of course.

Any thoughts on this ?

Axel.

Roger Braun

unread,
Jun 6, 2011, 6:25:51 AM6/6/11
to kan...@googlegroups.com
2011/6/6 Axel Bodart <axel....@gmail.com>:

I have been working on a web based interface for the git repository so
Ulrich can edit the files in whatever he wants, copy the result into a
text field and submit the changes. It does use embedded SVG for
display, which only works in Firefox 4 and newer WebKit-based
browsers. If you want, you can take a look here:

http://rokuhara.japanologie.kultur.uni-tuebingen.de/kanjivg/

An example with several variants (傚):

http://rokuhara.japanologie.kultur.uni-tuebingen.de/kanjivg/svg/%E5%82%9A/0

--
Roger Braun
rbraun.net | humoralpathologie.de

Luis Felipe López Acevedo

unread,
Jun 6, 2011, 10:22:54 AM6/6/11
to kan...@googlegroups.com
2011/6/5 Alexandre Courbot <gnu...@gmail.com>

They were handmade using GIMP. Each stroke is in a XCF file layer. Then I run a python script to convert to GIF or video. Stroke order is taken from Japanese friends and Wikipedia.

 
Alex.


--
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

Jonathan Landis

unread,
Jun 6, 2011, 12:30:44 PM6/6/11
to kan...@googlegroups.com
On Mon, 2011-06-06 at 12:25 +0200, Roger Braun wrote:
> It does use embedded SVG for
> display, which only works in Firefox 4 and newer WebKit-based
> browsers.

Microsoft added basic support for SVG in IE 9. The basic features work
(shapes, paths, gradients, opacity, etc.), but SMIL (declarative
animation) does not.

However, in my own experiments with animation, I find that a static
frame-by-frame display like what jisho.org does is actually more useful
if you are doing a lot of studying.

If you are studying a complex kanji, you look at the animation, start
writing the strokes, and then forget something in the middle, so you
have to restart the animation and wait until it shows you the part you
are interested in. If you make the strokes slow enough to be clearly
distinguishable, this starts to get inconvenient after a while.

Additionally, cross-browser support for restarting animations is spotty
and you sometimes have to resort to reloading the entire page. Or
perhaps there is a good way to do it, and I just don't know what it is.

If instead the diagram is shown as a series of frames (with some kind of
marker to show where each stroke starts), you can look at the diagram,
draw a few strokes, and then look back at the diagram and continue where
you left off.

The only issue I have with the jisho.org format is that it is too wide,
and you have to scroll horizontally to see the whole diagram. Instead,
the diagram should be limited to 8 columns or so, with additional rows
as needed.

Here is an example I generated by parsing the old kanjivg format,
generating an SVG, and then rendering as an 8-bit colormapped PNG. For
complex kanji, the PNG file is actually smaller than the SVG (in this
case, half the size), and of course PNG is more widely supported. You
can include PNG files in Anki decks, for example.

http://mountaincat.org/%E9%B8%9E.png

For fun, here is the animated version. I cheat and fade the strokes in
as the pen draws them instead of actually animating partial strokes.
Also, each stroke is drawn in the same amount of time, irrespective of
its length. Getting a constant-speed pen I think would require computing
the arc length of each stroke, and I didn't go that far.

http://mountaincat.org/%E9%B8%9E.svg


JKL


Ben Bullock

unread,
Jun 6, 2011, 8:13:12 PM6/6/11
to kan...@googlegroups.com
On 7 June 2011 01:30, Jonathan Landis <jkla...@gmail.com> wrote:

> However, in my own experiments with animation, I find that a static
> frame-by-frame display like what jisho.org does is actually more useful
> if you are doing a lot of studying.
>
> If you are studying a complex kanji, you look at the animation, start
> writing the strokes, and then forget something in the middle, so you
> have to restart the animation and wait until it shows you the part you
> are interested in. If you make the strokes slow enough to be clearly
> distinguishable, this starts to get inconvenient after a while.

I agree with this, stroke animations look nice but they are not very useful.

I prefer one big drawing with the stroke numbers on it.

> The only issue I have with the jisho.org format is that it is too wide,
> and you have to scroll horizontally to see the whole diagram. Instead,
> the diagram should be limited to 8 columns or so, with additional rows
> as needed.
>
> Here is an example I generated by parsing the old kanjivg format,
> generating an SVG, and then rendering as an 8-bit colormapped PNG. For
> complex kanji, the PNG file is actually smaller than the SVG (in this
> case, half the size), and of course PNG is more widely supported. You
> can include PNG files in Anki decks, for example.
>
> http://mountaincat.org/%E9%B8%9E.png

http://kanji.sljfaq.org/kanjivg/memory.cgi?t=multi&w=8&k=%E9%B8%9E&s=1.0

Jonathan Landis

unread,
Jun 6, 2011, 8:56:37 PM6/6/11
to kan...@googlegroups.com
On Tue, 2011-06-07 at 09:13 +0900, Ben Bullock wrote:
> I prefer one big drawing with the stroke numbers on it.

The use of color on the sljfaq link you posted is interesting. I wonder
if it would be possible to use color, shading, or some other technique
to illustrate stroke order inside a single frame instead of writing the
stroke numbers explicitly.

> For complex kanji, the PNG file is actually smaller than the SVG (in this
> case, half the size),

This part of my analysis wasn't very careful. It is true that the file
is smaller, but the PNG is compressed, and the SVG isn't. For bandwidth
considerations you are probably going to end up compressing the SVG in
transit, which makes it much smaller than the PNG.

JKL


Alexandre Courbot

unread,
Jun 7, 2011, 10:38:56 AM6/7/11
to kan...@googlegroups.com
On Mon, Jun 6, 2011 at 7:25 PM, Roger Braun <ro...@rogerbraun.net> wrote:
> I have been working on a web based interface for the git repository so
> Ulrich can edit the files in whatever he wants, copy the result into a
> text field and submit the changes. It does use embedded SVG for
> display, which only works in Firefox 4 and newer WebKit-based
> browsers. If you want, you can take a look here:
>
> http://rokuhara.japanologie.kultur.uni-tuebingen.de/kanjivg/
>
> An example with several variants (傚):
>
> http://rokuhara.japanologie.kultur.uni-tuebingen.de/kanjivg/svg/%E5%82%9A/0

Very nice! My dream would be to have this combined with a more-or-less
visual editor to allow people to fix kanji simply and to test new
variants. All that combined with a nice renderer. If we have one or
two Javascript gurus doing it, it should be quite doable - and I'm
ready to give them full access to the site if they want to play with
it.

We need a nice site, a nice viewer, and a nice editor to leverage the
unified format (provided it does not meet opposition from Ulrich).
Maybe this is the good time to get that done! :)

Alex.

Reply all
Reply to author
Forward
0 new messages