Skip to content

Conversation

@DustyShoe
Copy link
Contributor

@DustyShoe DustyShoe commented Dec 30, 2025

Summary

Canvas Basic Text Tool!

Summary:

  • Adds a basic Text tool with overlay editing and rasterize-on-commit.
  • New text options row (font, size, bold/italic/underline/strike, alignment).
  • Handles hotkey suppression during typing, commit on Enter/tool switch.
  • Overlay positioning, tests for text helpers.
2025-12-30.13-29-23.mp4

Related Issues / Discussions

The fonts information is stored in invokeai\frontend\web\src\features\controlLayers\text\textConstants.ts
If anyone have an opinion what fonts and fallbacks should be used, please write in comments. There's 10 fonts to choose ATM and i'd like to make selection as diverse as possible.

QA Instructions

  • Activate Text tool, click canvas, type 2–3 lines, Shift+Enter adds newline, Enter commits. Esc cancels operation.
  • Verify that typing works as expected, hotkeys are suppressed while typing (only Ctrl/Cmd+C/V/Z/Y allowed).
  • Change font, size, bold/italic/underline/strike, alignment; preview matches raster after commit.
  • Click outside text box or switch tools; commit happens once, creates a raster layer above selected layer.

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added frontend PRs that change frontend files docs PRs that change docs labels Dec 30, 2025
@DustyShoe DustyShoe changed the title Feature/add text tool to canvas Feature(UI): Add text tool to canvas Dec 30, 2025
@DustyShoe DustyShoe marked this pull request as ready for review December 30, 2025 12:02
@DustyShoe DustyShoe requested a review from dunkeroni as a code owner January 7, 2026 02:39
@ufuksarp
Copy link
Contributor

ufuksarp commented Jan 18, 2026

Is it possible to pick from the fonts that are installed on the system?
Also tracking setting seems essential.

@DustyShoe
Copy link
Contributor Author

Is it possible to pick from the fonts that are installed on the system?

Unfortunately not. Because of security and privacy restrictions.
Web applications run in a sandbox and are not allowed to freely access system resources, including installed fonts, since this could be used for fingerprinting users or leaking system information.

As a workaround i was planning to add folder where you can place your fonts and app will scan for them. But that requires digging into backend and i want to avoid it at that stage.

Also tracking setting seems essential.

Not sure what you mean.

@ufuksarp
Copy link
Contributor

That’s unfortunate.

Tracking is the spacing between the characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs PRs that change docs frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants