Font loading: - Inter Regular font bundled (342KB TTF) - TypefaceFontProvider for Paragraph API - MakeFreeTypeFaceFromData for Font object - Fonts load async, fallback to drawText before ready Text rendering: - ParagraphBuilder with font family, size, letter spacing, line height, text alignment - Multi-line text wraps to node width - Text nodes render at correct position in local space Inline editing: - Double-click text node → HTML textarea overlay - Positioned/sized to match node on canvas (zoom-aware) - Live updates to scene graph on input - Escape or blur commits edit - Keyboard events stop propagation during editing - Text cursor for TEXT tool
334 KiB
334 KiB