It is currently Fri Jul 31, 2026 12:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Numeric input for text box sizing?
PostPosted: Sat Feb 15, 2025 8:35 pm  (#1) 
Offline
GimpChat Member

Joined: Feb 08, 2025
Posts: 14
GIMP Version: 2.10.38
Operating System: Windows
GIMP Experience: Intermediate Level

List any relevant plug-ins or scripts:
none

List any ERROR messages you received:
none



I create a text box. It's almost never exactly where I want it. What I'd like to is type in the size and the location, have the text box appear there, then type my text into it. Or type my text in, then place the box where it belongs.

I can move and resize text layers by dragging with the mouse, and they stay text. Works great, except for being the mouse.
I can move them by entering x and y in the context menu's "Edit Layer Attributes". Works great.
I cannot find a place to enter numbers to change the size. Every option in the 'layer' menu, and other places, that I've tried (or found) converts the text to a graphic layer, even "Layer Boundary Size", which I would expect to adjust the bounding box of the text, the same as dragging with the mouse.
Is there such a place? If so, how do I access it?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Numeric input for text box sizing?
PostPosted: Sun Feb 16, 2025 5:50 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2610
Yeah, you can do this by setting up guides, or use the grid function.

What is really missing from Gimp is a Macro function for recording actions. The Gimp devs say use script-fu. Reads like sanskrit to me .
However resizing a text layer is only a couple lines of code that you can use in the script-fu console.
(define image 1) (define layer (car (gimp-image-get-active-layer image)))

(gimp-text-layer-resize layer newwidth newheight)


That can go in script-fu "boiler plate" (attached) and it might work like this https://i.imgur.com/XxEF9qA.mp4
Usual guarantee - absolutely none (it is a bit flakey) For those 3 brave souls who downloaded, a slight mod to make it less flakey


Attachments:
macro-text-box.scm [856 Bytes]
Downloaded 60 times
Top
 Post subject: Re: Numeric input for text box sizing?
PostPosted: Sun Feb 16, 2025 9:28 am  (#3) 
Offline
GimpChat Member

Joined: Feb 08, 2025
Posts: 14
"No" would have been a perfectly sufficient, and accurate, answer. I HAVE workarounds, I was asking a direct question about whether I had simply not FOUND the setting. "There isn't one" is complete and sufficient.

I've resorted to using guide lines, because you can enter them numerically. But
A. it's an extra meaningless step, that doesn't contribute to the drawing process - it's a workaround, not a solution
B. guide management is terrible to nonexistent - basically they're temporary throwaways. You can't practically set up a bunch of master guides for the whole project and easily add and remove temporary ones. It's one at a time, with the mouse, or else delete 'em all.
C. I can't (well, I CAN, eventually, it's just modulo math) figure out how to set up a grid that I can change to put a single line exactly where I want. You want a grid line at pixels 181, 755, and 2233, what grid do you use?

It looks to me like a bug in the "Layer Boundary..." function, and I'll likely report it as that, but I don't know whether it's considered a bug or a feature.

I'll try that script, but it may be a couple of days before I know whether it works for me. Thanks.

BTW is there a way to mark your post as an accepted answer? I don't see one.


Top
 Post subject: Re: Numeric input for text box sizing?
PostPosted: Sun Feb 16, 2025 12:13 pm  (#4) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2610
Cadwallader wrote:
"No" would have been a perfectly sufficient,
...snip....
.....I've resorted to using guide lines, because you can enter them numerically. But
A. it's an extra meaningless step, that doesn't contribute to the drawing process - it's a workaround, not a solution
B. guide management is terrible to nonexistent -


Ok, "No"

Guide management ? I would say limited rather than nonexistant. There are scripts / plugins that save and restore guide sets and for templates, guides are saved in .xcf image format.


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group