@dfosco/storyboard 0.5.0-beta.35 → 0.5.0-beta.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard",
3
- "version": "0.5.0-beta.35",
3
+ "version": "0.5.0-beta.36",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Storyboard prototyping framework — core engine, React integration, and canvas",
@@ -284,9 +284,21 @@ export default forwardRef(function TerminalWidget({ id, props, onUpdate, multiSe
284
284
  return
285
285
  }
286
286
 
287
- const dims = calcDimensions(width, height, fontSize)
288
287
  const cfg = getTerminalConfig()
289
288
 
289
+ // Wait for web fonts to load before initializing ghostty's glyph atlas.
290
+ // Without this, ghostty rasterizes glyphs against fallback font metrics,
291
+ // then when the real font swaps in, glyphs render misaligned against the
292
+ // cell grid (visible as broken box-drawing characters and overstrike on
293
+ // letters). Especially visible on consumer installs where fonts come
294
+ // over the network instead of from cache.
295
+ if (typeof document !== 'undefined' && document.fonts?.ready) {
296
+ try { await document.fonts.ready } catch {}
297
+ if (disposed) return
298
+ }
299
+
300
+ const dims = calcDimensions(width, height, fontSize)
301
+
290
302
  term = new ghostty.Terminal({
291
303
  fontSize: cfg.fontSize ?? 13,
292
304
  fontFamily: cfg.fontFamily ?? "'Ghostty', 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace",