Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiragana and katakana #2

Open
ailectra opened this issue Jan 9, 2021 · 10 comments
Open

Hiragana and katakana #2

ailectra opened this issue Jan 9, 2021 · 10 comments

Comments

@ailectra
Copy link

ailectra commented Jan 9, 2021

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
Copy link
Owner

krmanik commented Jan 9, 2021

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
Copy link
Author

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
Copy link

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

@krmanik
Copy link
Owner

krmanik commented Jul 7, 2021

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

@krmanik
Copy link
Owner

krmanik commented Sep 26, 2022

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
Copy link
Author

Hi,

I used the data from animCJK.

@krmanik
Copy link
Owner

krmanik commented Sep 27, 2022

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
Copy link
Author

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
Copy link
Owner

krmanik commented Sep 27, 2022

That's great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants