Frame / Grid / Enclosure for Kanji size and stroke position assessment [ KanjiVG / kanjivg2svg / Anki's Kanji Colorizer Add-on ]

Skip to first unread message

Germánico Baltar

Apr 8, 2020, 8:57:22 PM4/8/20
to KanjiVG

I'm studying Kanji by making my own Kanji cards in Anki.
So far I've found an Anki Add-on called "Kanji Colorizer" which automatically adds the KanjiVG colour diagrams to Anki cards. Saves a lot of time indeed.
Unfortunately I need the kanji characters within a frame grid to be able to write them correctly.

I have no idea of Python (Anki's 'Kanji Colorizer' Add-on programming language) or SVG (kanjiVG, and further below, 'kanjivg2svg')
So far I've done this:

1) I've dug into the Anki Add-on code (Kanji Colorizer). Although I don't understand very much, it seems to me that the KanjiVG output sent by the Add-on to the main software (Anki) is the rendering of the appropriate KanjiVG image... I mean, you choose a particular kanji for your card and the add-on manages to find its stroke order for you. I assume the drawing is sent back to Anki in SVG format, because if I grab the output and copy it to the clipboard, I can't paste this content into MS paint, MS word, etc. 
I noticed that Kanji Colorizer has a local copy of what appears to be a subset of KanjiSVG, and the filenames are the corresponding Unicode Hex numbers for each Kanji.

2) I found project that uses KanjiVG (kanjivg2svg, used in website They do have their own version of KanjiVG files through this software,
(Fortunately there's a file here called "svgs.tar.gz" that already has the rendered kanji characters so I didn't have to deal with yet another programming language). So now,
PROS: Grid exists
CONS: The file names are different from those stored in Kanji Colorizer, so I couldn't replace the files or even just match them manually, for that matter.
Also, kanjivg2svg adds a new frame with each stroke. I find this particular rendering hard to follow, let alone that the space taken for the stroke diagram in each Anki flashcard will be different depending on the number of strokes.

3) I tried to edit a randomly-chosen Kanji Colorizer SVG file, so that I could see the output directly by using Anki as a fiddle with it.
- a. I was successful in adding the grid but then you find a colored kanji that is considerably bigger.
- b. I couldn't find a way to make the kanji drawing smaller (to fit in the box), so I tried the opposite: making the grid box bigger.
Unfortunately, I cannot find a way to get the kanji perfectly centered. Even though I used kanjivg2svg's "measurements" as reference, this still escapes me.

Any ideas welcome. Thanks in advance.

Alexandre Courbot

Apr 14, 2020, 8:05:48 AM4/14/20
to KanjiVG

Have you reached out to the Kanji Colorize add-on author on ? If you open an issue I'm
sure it would be a matter of minutes to get the feature you need.
> --
> --
> You received this message because you are subscribed to the "KanjiVG" group.
> For options and unsubscribing, visit this group at
> ---
> 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
> To view this discussion on the web visit

Germánico Baltar

Apr 15, 2020, 4:55:13 AM4/15/20
to KanjiVG
Hi Alexandre,

Thank you for your reply. 
Yes, I emailed the author two weeks ago but have received no response so far.
I kept on looking at this and the only workaround I found was to inject  a block of SVG code (the grid frame drawing) into each kanji file, using a script. I owe Mark Opperman a debt of gratitude for the core injector, as it were. This solution is not perfect but serves the purpose I was seeking. 
I'll follow up with Cayenne (Kanji Colorizer) to see if she could and would consider adding this feature (I mean, not sure if it's even possible to combine the grid with each kanji file in Python without resorting to advanced image processing libraries). 
By the way, I realise it might be tricky to tell whether this topic belonged in KanjiVG's group in the first place. My view at the time was that having contacted the derivative work's author (Kanji Colorizer's) to no avail, I would take matters into my own hands, so I'd be modifying KanjiVG thus producing a derivative work myself, as was the case.


> To unsubscribe from this group and stop receiving emails from it, send an email to
Reply all
Reply to author
0 new messages