function minifyTtf(contents, opts) {

    opts = opts || {};

    var ttfobj = contents;

    if (Buffer.isBuffer(contents)) {
        ttfobj = new fonteditorCore.TTFReader(opts).read(b2ab(contents));
    }

    var miniObj = minifyFontObject(
        ttfobj,
        opts.subset,
        opts.use
    );

    var ttfBuffer = ab2b(
        new fonteditorCore.TTFWriter(Object.assign({writeZeroContoursGlyfData: true}, opts)).write(miniObj)
    );

    return {
        object: miniObj,
        buffer: ttfBuffer
    };

}
minifyTtf

@param  {Buffer|Object} contents         contents
@param  {Object} opts         opts
@return {Buffer}              buffer