-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add "text as image" node #2125
Add "text as image" node #2125
Conversation
This seems fine to me, but I'll let @RunDevelopment confirm |
I think this node probably fits better in the "Create Images" group in the "Images" category, since it involves image creation. Thoughts? |
I don't know because, to me, it would be more a converter, however, in chaiNNer, I would agree with you to put it in "create images" group. It makes more sens. What about node title? "Create from text" ? it might be confused with IA... |
Is there no better way than to vendor fonts? Can't we use fonts installed on the current system? |
If there's no built in way, we could probably just manually scan the system fonts folder and build a list of all the available valid fonts |
Because I think it would be a nightmare.
|
Ok yeah, you've convinced me |
backend/src/packages/chaiNNer_standard/image/create_images/text_as_image.py
Outdated
Show resolved
Hide resolved
…t_as_image.py Co-authored-by: Joey Ballentine <34788790+joeyballentine@users.noreply.github.com>
Hmmm, yeah, that certainly will be difficult. But having 3 font families to pick from and having those fonts be vendored just doesn't sit right with me. I mean, what's the point of having a font selector if there is no real choice? So how about we just remove the font selector for now and just use one. Font style (bold, italic, etc.) could be its own input. |
Thanks for your feedback. |
- removed font selection - added bold/italic checkbox - improved test project
backend/src/packages/chaiNNer_standard/image/create_images/text_as_image.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/image/create_images/text_as_image.py
Outdated
Show resolved
Hide resolved
- Changed ouptut image as RGBA only - Change default width to 500: better UX when using default node values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 other minor things.
backend/src/packages/chaiNNer_standard/image/create_images/text_as_image.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/image/create_images/text_as_image.py
Outdated
Show resolved
Hide resolved
…t_as_image.py Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
…t_as_image.py Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
|
wrong manipulation, sorry. |
I'll play around with this again today and then code review it, but I'm guessing it's probably good now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adegerard!
Motivation
This node transforms a text into an image.
It creates an image and draw the text with the specified alignement
It calculates the font size to fit the canva:
width
andheight
input values.Choices and limitations
As discussed on Discord, would be great to change the dropdown by grids of 'checkable buttons' (checkboxes)
For better user experience, PR #2087 should be merged in main