Re: [KanjiVG/kanjivg] Most (all?) kanji are off-center (#192)

Skip to first unread message


Apr 18, 2021, 12:37:40 PM4/18/21
to Alexandre Courbot, KanjiVG
On 4/17/21 6:37 PM, Alexandre Courbot wrote:
> Yeah, the canvas has an interesting size to say the least. Maybe it
> would be worth harmonizing all characters to something more intuitive,
> e.g. 100x100.
That sounds good but it's a rather significant change.  And do you plan
on changing the svg files too??  I'm guessing someone out there has
109x109 hard coded into their program... probably multiple someones :)

Does anyone know the history of the 109x109 size?

I just pulled the latest versions of and

All the svg files have:
<svg xmlns="" width="109" height="109"
viewBox="0 0 109 109">

The xml namespace declaration is:
<kanjivg xmlns:kvg=''>
And I don't see the width/height/viewbox info anywhere in the file.

I believe the viewbox is used as a transform matrix and the width/height
are used to set the size of the image, right?  Would just adding the
viewbox info to the XML once at the top would fix the problem.  i.e.
Current xml:
<kanjivg xmlns:kvg=''>
<kanji id="kvg:kanji_00021">
<g id="kvg:00021">

<kanjivg xmlns:kvg=''>
<viewBox 0,0,109,109/>
<kanji id="kvg:kanji_00021">
<g id="kvg:00021">

<kanjivg xmlns:kvg=''>
<kanji id="kvg:kanji_00021" viewBox="0 0 109 109">
<g id="kvg:00021">

The second is the one I would prefer because it would allow you to
change things to a character level later if you should want to.

I put a version of kanjivg-20160426.xml,gz. on my page at if there's interest in this.

Steve S.

Reply all
Reply to author
0 new messages