opentype 0.1.0
opentype: ^0.1.0 copied to clipboard
An OpenType and TrueType font parser and writer
A Dart API wrapper for opentype.js, an OpenType and TrueType font parser and writer.
Example Usage #
main() {
loadFont("MyFont.woff", allowInterop(fontLoaded));
}
fontLoaded(err, font) {
if (err != null) {
print("Couldn't load the font");
} else {
var canvas = querySelector("#canvas");
var ctx = canvas.getContext('2d');
font.draw(ctx, 'Hello World', 0, 25, 25);
}
}