Small realm database with wrapper. Contains ~6k different kanji and radicals vector data. Stored as BezierPath arrays, each beziar path represent one kanji stroke.
- Realm
do {
let provider = try KanjiProvider()
let bezierPaths: [UIBezierPath]? = provider.pathesForKanji("数")
} catch {
debugPrint(error)
}
You can then use the array of bezierPaths to draw kanji or to do whatever you like with it.
All data comes from this repo https://github.com/KanjiVG/kanjivg. Long ago I extracted strokes info from svgs inside this repo, and stored them as binary files with array of UIBezierPath encoded to blob. Then I wrote a small python script which stored all this data into small sqlite database. And now since I use Realm in projects which potentially will use this framework, I generated Realm database from that old sqlite db.