This PR adds a method writer.getCharacterData(), which returns a promise containing the parsed character data after it's loaded. This is to provide a more usable method to get info about the currently loaded character without needing to do anything hacky around reading internals like writer._character. This promise will always return the character data or error if it's not possible.
This character data contains the currently loaded character symbol (ex 我), and an array of strokes containing the stroke data needed to render the character. This is probably most useful to determine how many strokes there are in the character.
This PR adds a method
writer.getCharacterData()
, which returns a promise containing the parsed character data after it's loaded. This is to provide a more usable method to get info about the currently loaded character without needing to do anything hacky around reading internals likewriter._character
. This promise will always return the character data or error if it's not possible.This character data contains the currently loaded character symbol (ex
我
), and an array ofstrokes
containing the stroke data needed to render the character. This is probably most useful to determine how many strokes there are in the character.related to #222