import fontkit.*;
@:jsRequire("fontkit") @valueModuleOnly extern class Fontkit {
@:native("default")
static final default_ : fontkit.Fontkit;
}
But .default does not resolve to the class, instead it should be
import fontkit.*;
@:jsRequire("fontkit") @valueModuleOnly extern class Fontkit {
/**
Opens a font file asynchronously, and calls the callback with a font object.
For collection fonts (such as TrueType collection files),
you can pass a postscriptName to get that font out of the collection instead of a collection object.
**/
static function open(filename:String, postscriptName:String, callback:(err:Null<js.lib.Error>, font:Font) -> Void):Void;
/**
Opens a font file synchronously, and returns a font object.
For collection fonts (such as TrueType collection files),
you can pass a postscriptName to get that font out of the collection instead of a collection object.
**/
static function openSync(filename:String, ?postscriptName:String):Font;
/**
Returns a font object for the given buffer.
For collection fonts (such as TrueType collection files),
you can pass a postscriptName to get that font out of the collection instead of a collection object.
**/
static function create(buffer:global.Buffer, ?postscriptName:String):Font;
}
Generates:
But .default does not resolve to the class, instead it should be