Skip to content

fix(text-tool): preserve logical size when committing HiDPI text#9111

Open
DustyShoe wants to merge 2 commits intoinvoke-ai:mainfrom
DustyShoe:Fix(Text-tool)/text-resize-on-commit-on-scaled-dispaly
Open

fix(text-tool): preserve logical size when committing HiDPI text#9111
DustyShoe wants to merge 2 commits intoinvoke-ai:mainfrom
DustyShoe:Fix(Text-tool)/text-resize-on-commit-on-scaled-dispaly

Conversation

@DustyShoe
Copy link
Copy Markdown
Collaborator

@DustyShoe DustyShoe commented May 3, 2026

Summary

Fixed a Text Tool bug where committed text could become larger than expected on HiDPI displays such as 150% display scaling.

The commit path was creating the raster object from the uploaded image's physical bitmap dimensions instead of the text's logical canvas dimensions. This change keeps the uploaded bitmap intact, but creates the committed canvas image object with logical width and height so the committed layer matches the on-canvas text size.

QA Instructions

  1. Set OS or browser display scaling to 150%.
  2. Open the canvas and select the Text Tool.
  3. Click on the canvas to enter text input mode.
  4. Type some text and note its visual size in the editor overlay before commit.
  5. Commit the text.
  6. Verify the new raster layer matches the overlay size instead of appearing about 1.5x larger.
  7. Repeat with rotated text and verify the committed result stays centered correctly.

Merge Plan

Simple merge.

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 the frontend PRs that change frontend files label May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant