@blorkfield/overlay-core 0.11.0 → 0.11.1

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/index.cjs CHANGED
@@ -3134,11 +3134,12 @@ var OverlayScene = class {
3134
3134
  maxDimension = Math.max(maxDimension, dims.width, dims.height);
3135
3135
  }
3136
3136
  if (maxDimension === 0) maxDimension = 100;
3137
+ const spaceWidth = letterSize / 3;
3137
3138
  const calculateLineWidth = (line) => {
3138
3139
  let width = 0;
3139
3140
  for (const char of line) {
3140
3141
  if (char === " ") {
3141
- width += 20;
3142
+ width += spaceWidth;
3142
3143
  } else if (/^[A-Za-z0-9]$/.test(char)) {
3143
3144
  const dims = charDimensions.get(char);
3144
3145
  if (dims) {
@@ -3196,7 +3197,6 @@ var OverlayScene = class {
3196
3197
  for (let i = 0; i < chars.length; i++) {
3197
3198
  const char = chars[i];
3198
3199
  if (char === " ") {
3199
- const spaceWidth = config.letterSpacing ?? letterSize;
3200
3200
  currentX += spaceWidth;
3201
3201
  globalCharIndex++;
3202
3202
  if (inWord) {