krmanik / Write-Kanji

Learn, read, write and practice Kanji by drawing strokes with Onyomi, Kunyomi and Meaning in English.
Other
9 stars 3 forks source link

Hiragana and katakana #2

Open ailectra opened 3 years ago

ailectra commented 3 years ago

Hi,

Just wanted to let you know that I converted animCJK kana data into MakeMeAHanzi compatible data : https://github.com/ailectra/kana-json

I have no trouble when writing hiragana with overlapping stroke in Hanzi Writer.

Maybe you could fetch this dataset when a kana is used?

krmanik commented 3 years ago

This is great. Thanks for creating this. I have tried it works fine. I recommend you to create pull request to hanzi-writer-data-jp. It really nice. I will create word list for Japanese language using this. I have tried to implement earlier but didn't work. So I am curious to know how you have created this? It is working without modifying existing hanzi-writer.js code.

ailectra commented 3 years ago

As coordinates are not the same in animCJK and MakeMeAHanzi, I had to transform the coordinates once I exported the SVG into JSON format. The x coordinate is the same but you have to use the following formula for y y = 900 - y

For example, if you have a point (660,211), it becomes (660, 900-211)=(660, 689)

Ross-Da-Boss commented 3 years ago

@infinyte7 if you could add kana support, it'd be great.

krmanik commented 2 years ago

Hi, In next update I will add the kana support. Stay tuned.

krmanik commented 2 years ago
krmanik commented 1 year ago

Hi @ailectra, Can you explain how you have created the strokes data for loop? I have checked the data of and it is different from KanjiVG so how the data is generated? Any ideas will be helpful and generating these characters, caoshu-hanzi-writer-data

ailectra commented 1 year ago

Hi,

I used the data from animCJK.

krmanik commented 1 year ago

The data for third and fourth strokes are merged and all strokes are flipped with changed coordinates. So, you have just put the two strokes data into one? [Left - animCJK] | [Right - kana json] image

ailectra commented 1 year ago

Yes that's exactly what I did. I flipped the coordinates because that's how hanzi-writer handles them. As for the merged strokes, it's because hanzi-writer doesn't handle overlapping strokes. It's the only way to make it work.

krmanik commented 1 year ago

That's great