define(["require", "exports", "./StyleOptionsState", "./Stylesheet", "./styleToClassName"], function (require, exports, StyleOptionsState_1, Stylesheet_1, styleToClassName_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.fontFace = void 0;
    /**
     * Registers a font face.
     * @public
     */
    function fontFace(font) {
        var stylesheet = Stylesheet_1.Stylesheet.getInstance();
        var rule = styleToClassName_1.serializeRuleEntries(StyleOptionsState_1.getStyleOptions(), font);
        var className = stylesheet.classNameFromKey(rule);
        if (className) {
            return;
        }
        var name = stylesheet.getClassName();
        stylesheet.insertRule("@font-face{" + rule + "}", true);
        stylesheet.cacheClassName(name, rule, [], ['font-face', rule]);
    }
    exports.fontFace = fontFace;
});
//# sourceMappingURL=fontFace.js.map