RSS/Atom feed Twitter
Site is read-only, email is disabled

Autosizing text to fit a fixed width?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Autosizing text to fit a fixed width? Bernard Rankin 09 Jan 16:18
Autosizing text to fit a fixed width? Bernard Rankin 13 Jan 02:00
  Autosizing text to fit a fixed width? Chris Mohler 13 Jan 04:45
Autosizing text to fit a fixed width? Bernard Rankin 14 Jan 04:50
Bernard Rankin
2009-01-09 16:18:07 UTC (about 16 years ago)

Autosizing text to fit a fixed width?

Hello,

Is there a way to create a single-line fixed width text box in GIMP such that the text inside starts out at some desired size, but is automatically shrunk in size to fit the width of the box if the supplied text is too long.

-- Thank you

Bernard Rankin
2009-01-13 02:00:59 UTC (about 16 years ago)

Autosizing text to fit a fixed width?

Is there a way to create a single-line fixed width text box in GIMP such that

the text inside starts out at some desired size, but is automatically shrunk in size to fit the width of the box if the supplied text is too long.

Anybody?

Chris Mohler
2009-01-13 04:45:09 UTC (about 16 years ago)

Autosizing text to fit a fixed width?

On Tue, Jan 13, 2009 at 7:00 PM, Bernard Rankin wrote:

Is there a way to create a single-line fixed width text box in GIMP such that

the text inside starts out at some desired size, but is automatically shrunk in size to fit the width of the box if the supplied text is too long.

Anybody?

Just thinking out loud here - this is untested and possibly impossible...

Can you render it with a nice default point size, then scale the new layer to fit?

A more elegant approach - render with a default point size, measure the new layer - if the new layer is too large, re-render at a smaller point size - you can use the ratio if [target width]/[new text layer width] = [default point size]/[the point size you need to fit].

You may need to convert the text layer to a non-text layer to get actual measurements - not sure.

Again - just rambling here, but maybe it will be useful...

Chris

Bernard Rankin
2009-01-14 04:50:11 UTC (about 16 years ago)

Autosizing text to fit a fixed width?

Just thinking out loud here - this is untested and possibly impossible...

Can you render it with a nice default point size, then scale the new layer to fit?

A more elegant approach - render with a default point size, measure the new layer - if the new layer is too large, re-render at a smaller point size - you can use the ratio if [target width]/[new text layer width] = [default point size]/[the point size you need to fit].

You may need to convert the text layer to a non-text layer to get actual measurements - not sure.

Again - just rambling here, but maybe it will be useful...

That's an interesting idea. It should work, right?