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 Jisho.org). 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.