"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFontFamily = exports.getDefaultFontName = exports.getFontString = void 0;
var SciChartDefaults_1 = require("../Charting/Visuals/SciChartDefaults");
/**
 * Creates the font string, which is used to set font on CanvasRenderingContext2D
 * @param fontStyle The font style
 * @param fontWeight The font weight
 * @param fontSize The font size in pixels
 * @param fontFamily The font family
 */
var getFontString = function (fontStyle, fontWeight, fontSize, fontFamily) {
    var fontFamilyWeb = (0, exports.getFontFamily)(fontFamily, false);
    if (!fontWeight)
        return "".concat(fontStyle, " ").concat(fontSize, "px ").concat(fontFamilyWeb);
    return "".concat(fontStyle, " ").concat(fontWeight, " ").concat(fontSize, "px ").concat(fontFamilyWeb);
};
exports.getFontString = getFontString;
var getDefaultFontName = function () { return SciChartDefaults_1.SciChartDefaults.autoFontName.toLowerCase(); };
exports.getDefaultFontName = getDefaultFontName;
var getFontFamily = function (fontFamily, isNativeFont) {
    if (fontFamily.toLowerCase() === (0, exports.getDefaultFontName)()) {
        return isNativeFont ? SciChartDefaults_1.SciChartDefaults.nativeFontFamily : SciChartDefaults_1.SciChartDefaults.canvasFontFamily;
    }
    return fontFamily;
};
exports.getFontFamily = getFontFamily;
