"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.webText = void 0;
const measureText_1 = require("../../../util/web/measureText");
function webText(window, opt) {
    const { document } = window;
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');
    ctx.textAlign = 'center';
    const text = {
        measureText: (text, fontSize) => {
            return (0, measureText_1.measureText)(ctx, text, fontSize);
        },
    };
    return text;
}
exports.webText = webText;
//# sourceMappingURL=text.js.map