Repository navigation
Lifted text comes back at its original size: starter poster sizes words from the font's glyphs - #88
Merged
Conversation
…l glyphs All-caps lines came back at about half their size (0.75 x the box height assumed ascenders and descenders), so poster_fit had to recover the size. The starter now measures the words' ink box in the chosen font and fits it to the lifted box, and the canvas takes the artwork's main colour instead of white, so no seam shows at the edges. An unknown font or a slanted line keeps the old rule of thumb. From the 2026-11-30 promo run's product feedback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RsXeXe7R2yuktRA3h62ig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Observation
Creators fixing misspelled lettering in AI images want the corrected words to look like the ones they replace, and the advice this month is to keep the picture and move the words onto a real text layer:
funkbox's
image_tracewithlift_text+textsdoes that, but in today's promo its starter poster set all-caps lines at about half their size: the title came out at 0.032 of the canvas height where the original was 0.06. That happened because the size was0.75 x box height, which assumes the box includes ascenders and descenders.poster fitneeded two runs (about 100 previews) to bring the words back to size. The starter also used a white canvas, which left a 1 px light seam at the edges under dark artwork. The promo's reviewer flagged that seam.What changed
funkbox/stills/trace.py: the starter poster sizes each lifted line from the chosen font's real glyphs (_ink_scale/_start_size). It fits the words' ink box to the lifted box, by height and by width, so all-caps words come back at the original's size. A slanted line, or a font that can't be loaded, keeps the old rule of thumb.#ffffff.docs/stills.md: one paragraph on both changes.tests/stills/test_s15_lift_text.py: two new tests. The first checks that all-caps text drawn at 120 px on a 1000 px canvas comes back at 0.12 ± 0.012 on a dark canvas. The second checks the fallback for a missing font.How it was tested
poster_compareof the unfitted starter rose from 86.7 to 92.4.FUNK_GL_BACKEND=egl python -m pytest -q: 1592 passed, 26 skipped.From the 2026-11-30 promo run's product feedback.
Generated by Claude Code