Pseudofont class rewrite
waterrmalann opened this issue · 0 comments
The pseudofont generator/class in its current state does not support multi-character mappings (like "V" mapping to "\/"). This also results in incompatibility with certain unicode symbols.
Solution:
It would be much better if the string-based mapping system could be converted to an array-based mapping system.
Potential headache:
This means altering the format of the fonts.json file and not only causing incompatibility with older versions but also requiring the existing fonts to be converted into the new format.
{
"fontName": "FullWidth",
"fontLower": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"],
"fontUpper": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"fontDigits": "0123456789"
}
"fontLower" shows how the new array-based format would look like
"fontUpper" shows the existing string-based format
One way to tackle this is to keep support for the existing JSON format, while also introducing the new and advanced format. They could even be intermixed like in the above example. To be honest, this could be the best approach as existing single-character mapped fonts really wouldn't benefit from upgrading to the advanced array-based format and would just unnecessarily increase the size of the JSON file.