system-canvas-standalone 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/system-canvas.js
CHANGED
|
@@ -14119,7 +14119,7 @@ var SystemCanvas = (() => {
|
|
|
14119
14119
|
}
|
|
14120
14120
|
|
|
14121
14121
|
// ../core/dist/text.js
|
|
14122
|
-
var GLYPH_WIDTH_RATIO = 0.
|
|
14122
|
+
var GLYPH_WIDTH_RATIO = 0.55;
|
|
14123
14123
|
function measureTextWidth(text, fontSize) {
|
|
14124
14124
|
if (!text)
|
|
14125
14125
|
return 0;
|
|
@@ -18181,9 +18181,7 @@ var SystemCanvas = (() => {
|
|
|
18181
18181
|
const y = region.y + region.height / 2 + fontSize * 0.36;
|
|
18182
18182
|
return (0, import_jsx_runtime7.jsxs)("g", { pointerEvents: "none", children: [fill && (0, import_jsx_runtime7.jsx)(GradientDef, { id: gradId, fill }), (0, import_jsx_runtime7.jsx)("text", { x, y, fill: fillAttr, fontSize, fontWeight, fontFamily: font, textAnchor: anchor, letterSpacing: uppercase ? 0.8 : 0.2, pointerEvents: "none", children: displayValue })] });
|
|
18183
18183
|
}
|
|
18184
|
-
const
|
|
18185
|
-
const wrapWidth = Math.max(0, region.width - wrapInset * 2);
|
|
18186
|
-
const lines = wrapTextWithBreaks(displayValue, wrapWidth, fontSize, maxLines);
|
|
18184
|
+
const lines = wrapTextWithBreaks(displayValue, region.width, fontSize, maxLines);
|
|
18187
18185
|
if (lines.length === 0)
|
|
18188
18186
|
return null;
|
|
18189
18187
|
const baseY = region.y + fontSize;
|