Possible to use another font?

100 views
Skip to first unread message

Tim Tadić

unread,
Oct 20, 2016, 9:20:29 AM10/20/16
to KanjiVG
I probably already know the answer since KanjiVG is provided as SVG files, but is there any way to render the characters in a different font? The handwritten one is decent if you're actually practicing writing, I guess, but for all other purposes it's pretty terrible.

I'm asking because I want to learn radicals in the context of kanji, so for each radical I'd have a few kanji that use that radical or it's variants, and have the relevant radical in them colored. Judging from the viewer I can already "color groups instead of individual strokes", so my last problem is the font.

I'm really hoping I won't have to reinvent the wheel here, because as I'm sure you guys know, breaking down hundreds of characters into shapes is pretty time consuming.

Karl Rosvold

unread,
Oct 20, 2016, 11:05:33 AM10/20/16
to kan...@googlegroups.com
Haha. It took me about a year to break them down. On the other hand, if you only care about the first 3000 characters, you can get pretty close with Heisig's Remembering the Kanji 1 and Remembering the Kanji 3. (You don't need Remembering the Kanji 2 as that is about the readings, not the shapes.) Kanji ABC is another equally valid alternative, but only covers about 2000 characters.

Regarding the font, I'm pretty sure there's only one font, but that it can be *rendered* in various ways, but I'm pretty sure you can't change the vector paths. Others here can tell you more about the technical side of it, however.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

msk...@ansuz.sooke.bc.ca

unread,
Oct 20, 2016, 11:20:07 AM10/20/16
to KanjiVG
On Thu, 20 Oct 2016, Tim Tadić wrote:
> I'm really hoping I won't have to reinvent the wheel here, because as I'm
> sure you guys know, breaking down hundreds of characters into shapes is
> pretty time consuming.

There are databases available of character-to-component breakdowns; my
IDSgrep utility (http://tsukurimashou.osdn.jp/idsgrep.php) can read from
several, and there are one or two others for which I haven't yet written
input converters. The CJKVI project (https://github.com/cjkvi) is
probably the best-quality source for this data. So nobody really needs to
do the breakdowns themselves anymore unless they have unusual
requirements.

However, I don't know of a database that has high-quality hierarchical
breakdowns *and* also stroke order. It's tricky to record both kinds of
data at once because the stroke order sometimes conflicts with the
hierarchical organization, as for instance in enclosed characters like 園
where the outside is written partly before, partly after, the inside.
Databases like CJKVI usually stop above the level of individual strokes;
KanjiVG sacrifices hierarchical information in order to be able to
represent the stroke order implicitly by sequence in the file.

--
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/

Karl Rosvold

unread,
Oct 20, 2016, 11:30:16 AM10/20/16
to kan...@googlegroups.com
Hi Matthew,

Long time no chat. The enclosure "kunigamae" is 3 strokes, and for stroke order, the first two strokes are written first, then the thing inside the enclosure, and then the last  stroke. That's basically the way a large percentage of enclousre components work, and the handling of it is straight forward, I think. Just identify the component as an enclosure and say how many of its strokes are written after the next thing. There are other kanji where strokes are doubled up, for example, 適 seems to have 立 in it, but the bottom stroke is not written because the next component "covers" for it. (I'm not sure what word is appropriate -- I called it "overlapping" strokes.)

msk...@ansuz.sooke.bc.ca

unread,
Oct 20, 2016, 12:38:10 PM10/20/16
to kan...@googlegroups.com
On Fri, 21 Oct 2016, Karl Rosvold wrote:
> forward, I think. Just identify the component as an enclosure and say how
> many of its strokes are written after the next thing. There are other kanji

It's certainly do-able, either that way or by simply adding a stroke
number attribute to each stroke and not requiring the XML file to be
sorted on that attribute. But I don't know a database that actually does
record this information in a straightforward way - everybody either breaks
the hierarchy, or does not store stroke order in the first place.
KanjiVG breaks the hierarchy by storing the enclosing component as two
separate groups in the SVG file. From that data it's difficult to recover
the structure of which groups go together, although my IDSgrep import
script does a fair job.

As a matter of fact I'm departing for Tokyo tomorrow morning, on a trip
that will include giving a talk at SISAP 2016
(http://www.sisap.org/2016/conference-program.html) about the algorithmic
aspects of IDSgrep. This talk isn't really about where the data comes
from, only how bit vectors can be used to speed the search. It will quite
possibly be my last academic conference talk. I'm leaving academia and
going into the music synthesizer business. More on that in my Web log,
URL in signature.

Tim Tadić

unread,
Oct 21, 2016, 1:35:31 AM10/21/16
to KanjiVG
I wasn't thinking of breakdowns in the sense of a dictionary lookup, "provide a kanji - get back radicals" type of thing, there are plenty of tools for that. What I was going for is visual breakdowns, so provide a kanji and get back a few images, each highlighting a single radical. I'm pretty much looking for the exact same thing KanjiVG already does with the "color groups instead of individual strokes" option, just in a regular font instead of the handwritten style one. I don't care for the individual strokes, so that's not an issue.

That being said, I take it this isn't doable with KanjiVG or any other existing project? The prospect of having to type out characters one by one, converting them to paths, coloring them, and then saving an image for each radical is something I'd like to avoid if at all possible.

François Mizessyn

unread,
Dec 5, 2017, 3:39:12 PM12/5/17
to KanjiVG
May be you can consider the AnimCJK project (https://github.com/parsimonhi/animCJK), which is using a different font.

See also http://gooo.free.fr/animCJK/all.php: select the "Show radical" checkbox, enter a kanji in the data field then click on "Animate" button for a sample that displays radical in a different color (note that the project is not finished and some kanji have not a convenient decomposition yet, but it is of course possible to use any decomposition system including the kanjiVG one in conjunction with AnimCJK svg files).
Reply all
Reply to author
Forward
0 new messages