createPaths method
Implementation
List<ShapePath> createPaths(
String text, num size, Map<String, dynamic> data) {
// var chars = Array.from ? Array.from( text ) : String( text ).split( '' ); // workaround for IE11, see #13988
List<String> chars = text.split("");
num scale = size / data["resolution"];
num lineHeight = (data["boundingBox"]["yMax"] -
data["boundingBox"]["yMin"] +
data["underlineThickness"]) *
scale;
List<ShapePath> paths = [];
num offsetX = 0.0;
num offsetY = 0.0;
for (var i = 0; i < chars.length; i++) {
var char = chars[i];
if (char == '\n') {
offsetX = 0;
offsetY -= lineHeight;
} else {
var ret = createPath(char, scale, offsetX, offsetY, data);
offsetX += ret["offsetX"];
paths.add(ret["path"]);
}
}
return paths;
}