Skip to content

Show text being typed as the pixels it will be committed as - #121

Merged
robbietilton merged 1 commit into
mainfrom
text-edit-at-document-resolution
Sep 24, 2026
Merged

robbietilton merged 1 commit into
mainfrom
text-edit-at-document-resolution

Conversation

@robbietilton

Copy link
Copy Markdown
Owner

Zoomed past 100%, text looked sharp while typing and went soft once confirmed. The inline editor drew macOS vector text at screen resolution, while the committed layer holds the text at document resolution.

This matches Photoshop: text being typed is shown as the pixels it will be committed as, so confirming changes nothing on screen.

  • Canvas: draws the text being typed with EditorSession.textImage, the same render the layer gets, at the transform the editor shows. Existing text draws in its place in the stack with the layer's opacity and blend mode. New text draws just above the active layer, where its layer will go, or on top if that layer isn't drawn. The render is cached by style, so it's remade only when the text or its style changes.
  • Editor: the NSTextView keeps the caret, selection, IME and clipboard, but its glyphs are clear. The caret keeps the text color, and the selection is a translucent highlight so the text shows through.
  • Unchanged: effects and masks on the layer being edited still aren't shown while typing, as before.

Test: TypeToolTests.textLooksTheSameWhileEditingAndOnceCommitted draws a real canvas at 150% and 400%, checks the typed text is drawn, and compares it with the canvas after committing. It fails on main.

🤖 Generated with Claude Code

The inline editor drew macOS vector text at screen resolution, so zoomed in it looked sharper than the layer
it made, and confirming the text made it go soft. As in Photoshop, the canvas now draws the text being typed
as the layer's own pixels, in its place among the layers and with the layer's opacity and blend mode; the
text view keeps the caret, selection and input with clear glyphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robbietilton
robbietilton merged commit fe6cb2b into main Sep 24, 2026
2 checks passed
@robbietilton
robbietilton deleted the text-edit-at-document-resolution branch September 24, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant