opentype 0.1.0 copy "opentype: ^0.1.0" to clipboard
opentype: ^0.1.0 copied to clipboard

Dart 1 only

An OpenType and TrueType font parser and writer

A Dart API wrapper for opentype.js, an OpenType and TrueType font parser and writer.

Pub

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);
  }
}
0
likes
20
points
9
downloads

Publisher

unverified uploader

Weekly Downloads

An OpenType and TrueType font parser and writer

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

browser, js

More

Packages that depend on opentype