function BitmapFont(data, textures, ownsTextures) {
        var _a, _b;
        var info = data.info[0];
        var common = data.common[0];
        var page = data.page[0];
        var distanceField = data.distanceField[0];
        var res = (0,_pixi_utils__WEBPACK_IMPORTED_MODULE_3__.getResolutionOfUrl)(page.file);
        var pageTextures = {};
        this._ownsTextures = ownsTextures;
        this.font = info.face;
        this.size = info.size;
        this.lineHeight = common.lineHeight / res;
        this.chars = {};
        this.pageTextures = pageTextures;
        // Convert the input Texture, Textures or object
        // into a page Texture lookup by "id"
        for (var i = 0; i < data.page.length; i++) {
            var _c = data.page[i], id = _c.id, file = _c.file;
            pageTextures[id] = textures instanceof Array
                ? textures[i] : textures[file];
            // only MSDF and SDF fonts need no-premultiplied-alpha
            if ((distanceField === null || distanceField === void 0 ? void 0 : distanceField.fieldType) && distanceField.fieldType !== 'none') {
                pageTextures[id].baseTexture.alphaMode = _pixi_constants__WEBPACK_IMPORTED_MODULE_6__.ALPHA_MODES.NO_PREMULTIPLIED_ALPHA;
                pageTextures[id].baseTexture.mipmap = _pixi_constants__WEBPACK_IMPORTED_MODULE_6__.MIPMAP_MODES.OFF;
            }
        }
        // parse letters
        for (var i = 0; i < data.char.length; i++) {
            var _d = data.char[i], id = _d.id, page_1 = _d.page;
            var _e = data.char[i], x = _e.x, y = _e.y, width = _e.width, height = _e.height, xoffset = _e.xoffset, yoffset = _e.yoffset, xadvance = _e.xadvance;
            x /= res;
            y /= res;
            width /= res;
            height /= res;
            xoffset /= res;
            yoffset /= res;
            xadvance /= res;
            var rect = new _pixi_math__WEBPACK_IMPORTED_MODULE_0__.Rectangle(x + (pageTextures[page_1].frame.x / res), y + (pageTextures[page_1].frame.y / res), width, height);
            this.chars[id] = {
                xOffset: xoffset,
                yOffset: yoffset,
                xAdvance: xadvance,
                kerning: {},
                texture: new _pixi_core__WEBPACK_IMPORTED_MODULE_4__.Texture(pageTextures[page_1].baseTexture, rect),
                page: page_1,
            };
        }
        // parse kernings
        for (var i = 0; i < data.kerning.length; i++) {
            var _f = data.kerning[i], first = _f.first, second = _f.second, amount = _f.amount;
            first /= res;
            second /= res;
            amount /= res;
            if (this.chars[second]) {
                this.chars[second].kerning[first] = amount;
            }
        }
        // Store distance field information
        this.distanceFieldRange = distanceField === null || distanceField === void 0 ? void 0 : distanceField.distanceRange;
        this.distanceFieldType = (_b = (_a = distanceField === null || distanceField === void 0 ? void 0 : distanceField.fieldType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : 'none';
    }
@param data
@param textures
@param ownsTextures - Setting to `true` will destroy page textures
       when the font is uninstalled.