-
Notifications
You must be signed in to change notification settings - Fork 0
fix: make postcard text scale relative to postcard size #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Changed text rendering to use viewBox-relative units instead of pixels so text scales proportionally with the postcard size. - Changed fontSize from pixels to relative units (divided by 5) - Adjusted strokeWidth to scale properly (divided by 20) - Updated lineHeight calculations to use relative units Fixes #43 Co-authored-by: Marco Wettstein <macrozone@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude there was a missunerstanding. i meant the text on the back of the card (the message) |
|
Claude finished @macrozone's task —— View job ✅ CompletedFixed the misunderstanding - I've now applied the text scaling to the message on the BACK of the postcard. Changes made:
The text on the back of the postcard will now maintain proper proportions at any size. |
Converted the postcard back side to use SVG with viewBox-relative units so the message text scales proportionally with the postcard size. Co-authored-by: Marco Wettstein <macrozone@users.noreply.github.com>
|
@claude ok, does not work, because svg does not has automatic line breaks. any other idea? can we make it relative to the preview container? or measure? |
|
Claude finished @macrozone's task —— View job ✅ Fixed: Text scaling with proper line wrappingI've successfully replaced the SVG-based back side with an HTML/CSS approach that properly handles text wrapping while maintaining scalability. Changes Made:
How it works:
The text on the back of the postcard will now maintain proper proportions at any size while supporting automatic line breaks. |
- Replaced SVG rendering with HTML elements and CSS for the postcard back - Added ResizeObserver to scale text relative to container size - Message text now supports automatic line breaks with whitespace-pre-wrap - All text elements scale proportionally with postcard size Co-authored-by: Marco Wettstein <macrozone@users.noreply.github.com>
Fixes #43
Changes
Result
Text on postcards will now maintain proper proportions at any size.
Generated with Claude Code