"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const browser = require("../../../base/browser/browser.js");
const fastDomNode = require("../../../base/browser/fastDomNode.js");
const editorOptions = require("../../common/config/editorOptions.js");
function applyFontInfo(domNode, fontInfo) {
  if (domNode instanceof fastDomNode.FastDomNode) {
    domNode.setFontFamily(fontInfo.getMassagedFontFamily(browser.isSafari ? editorOptions.EDITOR_FONT_DEFAULTS.fontFamily : null));
    domNode.setFontWeight(fontInfo.fontWeight);
    domNode.setFontSize(fontInfo.fontSize);
    domNode.setFontFeatureSettings(fontInfo.fontFeatureSettings);
    domNode.setLineHeight(fontInfo.lineHeight);
    domNode.setLetterSpacing(fontInfo.letterSpacing);
  } else {
    domNode.style.fontFamily = fontInfo.getMassagedFontFamily(browser.isSafari ? editorOptions.EDITOR_FONT_DEFAULTS.fontFamily : null);
    domNode.style.fontWeight = fontInfo.fontWeight;
    domNode.style.fontSize = fontInfo.fontSize + "px";
    domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings;
    domNode.style.lineHeight = fontInfo.lineHeight + "px";
    domNode.style.letterSpacing = fontInfo.letterSpacing + "px";
  }
}
exports.applyFontInfo = applyFontInfo;
