It is currently 21 May 2022, 06:01

• Featuring Members' Images •
Could be related to 'Prepare Text Into Selection Plug-in'
tim
skinnyhouse
skinnyhouse
skinnyhouse
skinnyhouse

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Prepare Text Into Selection Plug-in

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger
1st Place
5822 Post(s)

Prepare Text Into Selection Plug-in

Post#1 by tim » 05 Mar 2019, 18:37


This plug-in is highly experimental. I tried to test it as much as I can.
This plug-in is meant to be used with the Filled Text Selection Plug-in (prior to it).
It prepares your text before you can run the Filled Text Selection Plug-in.
prepare_text_into_selection.py #
(6.95 KiB) Downloaded 132 times
prepare_text_into_selection.py #
version 2. Support double (hard) returns (newline characters) for new paragraphs (TO BE USED with version 10+ of Filled Text Selection Plug-in). And fixed major debugged code that skipped words in version 1.
(7.46 KiB) Downloaded 207 times
Plug-in Menu Location: Python-Fu/Prepare Text Into Selection

Instructions:
  1. Have your block of text on a text layer that you'd like to fit into a selection.
  2. Make your selection (you might want to save this selection as a path so you can later select it again to run the Filled Text Selection Plug-in).
  3. Have the text layer active with selection active.
  4. Run Plug-in (Python-Fu/Prepare Text Into Selection).
  5. Wait for it to finish. Progress bar will update letting you know how far it's coming along.
  6. The result is a text layer that has the optimal fontsize and proper (hard) line breaks to be then be used with the Filled Text Selection Plug-in.
  7. That's it. Have fun.

    Sample result (before on left, after on right).
    Prepare_text_into_selection_before_after.png
    Prepare_text_into_selection_before_after.png # (237.81 KiB) Viewed 3429 times Thumbnail
    The following video shows me using both plug-ins in order to fit a sample block of text into the sillhoutte:
    https://www.youtube.com/watch?v=HS-pNW1s5p0
aka Tin
World Food Program | Good Deeds Forum

         

Krikor
Forum Member
14th Place
1015 Post(s)

Post#2 by Krikor » 05 Mar 2019, 21:02


Tim, this plugin saves a lot of the manual work you would need to do if you were to use only the Filled Text Selection plugin.

But...

Would it be possible to force the fill to be made within the selection?
Imagine a selection in the form of the letter H, with two columns parallel and connected by a perpendicular column and between them.

It would be incredible if the padding of the text could fill only the selection area, not just the total area of the selection, including the region in the middle of the two columns, not selected.
Thx.
Attachments
gl0048.png
Krikor0048 PreparaeTextInSelection GimpLearn
gl0048.png # (32.12 KiB) Viewed 3402 times Thumbnail
Last edited by Krikor on 05 Mar 2019, 21:17, edited 1 time in total.
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

tim
GL Blogger
1st Place
5822 Post(s)

Post#3 by tim » 05 Mar 2019, 21:09


That's a major problem when you have something like the letter H.... I don't know the exact math involved in doing that.
Only horizontal filled shapes. I have no clue how to start fill words in to a shape such as the H.
aka Tin
World Food Program | Good Deeds Forum

         

tim
GL Blogger
1st Place
5822 Post(s)

Post#4 by tim » 06 Mar 2019, 00:31


imagine_lyrics_fitted_to_the_world.jpg
imagine_lyrics_fitted_to_the_world.jpg # (163.35 KiB) Viewed 3389 times Thumbnail
aka Tin
World Food Program | Good Deeds Forum

         

mahvin
Forum Member
29th Place
76 Post(s)

Post#5 by mahvin » 08 May 2022, 17:57


The Prepare Text for Selection crashes on my Windows GIMP 2.10.30
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes

mahvin
Forum Member
29th Place
76 Post(s)

Post#6 by mahvin » 08 May 2022, 21:46


Krikor wrote:
05 Mar 2019, 21:02
Tim, this plugin saves a lot of the manual work you would need to do if you were to use only the Filled Text Selection plugin.

But...

Would it be possible to force the fill to be made within the selection?
Imagine a selection in the form of the letter H, with two columns parallel and connected by a perpendicular column and between them.

It would be incredible if the padding of the text could fill only the selection area, not just the total area of the selection, including the region in the middle of the two columns, not selected.
Thx.
It can be done in Illustrator with relative ease, however, I have to try to see if this can reproduced in Inkscape. It might be able to.
Untitled-1.png
Untitled-1.png # (17.37 KiB) Viewed 97 times Thumbnail
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 23 guests