"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IconFontLayer = void 0;
var tslib_1 = require("tslib");
var constants_1 = require("./constants");
var icon_1 = require("./icon");
var IconFontLayer = /** @class */ (function (_super) {
    tslib_1.__extends(IconFontLayer, _super);
    function IconFontLayer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 初始化资源
     */
    IconFontLayer.prototype.initAssets = function () {
        this.loadIconAtlas();
    };
    /**
     * load 图片资源
     */
    IconFontLayer.prototype.loadIconAtlas = function () {
        var _a = this.options.iconAtlas, fontFamily = _a.fontFamily, fontPath = _a.fontPath, iconFonts = _a.iconFonts;
        var scene = this.scene;
        scene === null || scene === void 0 ? void 0 : scene.addFontFace(fontFamily, fontPath);
        scene === null || scene === void 0 ? void 0 : scene.addIconFonts(iconFonts);
    };
    /**
     * 默认配置项
     */
    IconFontLayer.DefaultOptions = constants_1.DEFAULT_OPTIONS;
    return IconFontLayer;
}(icon_1.IconLayer));
exports.IconFontLayer = IconFontLayer;
//# sourceMappingURL=icon-font.js.map