msdf-atlas-gen icon indicating copy to clipboard operation
msdf-atlas-gen copied to clipboard

Rework charset parser

Open Chlumsky opened this issue 4 years ago • 0 comments

Currently, the charset parser is implemented in Charset::load and can only work with a FILE * handle. It would be much better if it was possible to parse the data from other sources, such as a string in memory. The function could be reimplemented in the following way to allow for various implementations of reading input and outputting the parsed values.

template <int (*READ)(void *, int, void *), void (*ADD)(unsigned, void *)>
bool parseCharset(void *userData, bool disableCharLiterals = false);

Chlumsky avatar Oct 18 '20 08:10 Chlumsky