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

script-fu text

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.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

script-fu text Mark Andrachek, Jr. 05 Aug 18:03
  script-fu text Mark Andrachek, Jr. 05 Aug 23:28
   script-fu text Sven Neumann 06 Aug 01:20
   script-fu text Mark Andrachek, Jr. 06 Aug 03:35
  script-fu text Sven Neumann 05 Aug 23:49
Mark Andrachek, Jr.
2004-08-05 18:03:03 UTC (over 19 years ago)

script-fu text

I've got some script's I'm porting over from 1.2 to 2.0. (I'm using the windows version, if it makes a difference.)

There have been some changes, but I've gotten the scripts working again.

I had to add an alpha channel to my layers so I could raise/lower them, add gimp-edit-fill after gimp-edit-clear because of the alpha layer. I also had to change how I created my text layers, using gimp-text-fontname instead of gimp-text:

(tLayer (car (gimp-text myImage -1 0 0 inText -1 TRUE 110 1 "*" "Myriad Roman" "bold" "roman" "normal" "*" "*" "*")))

Changed to: (tLayer (car (gimp-text-fontname myImage -1 0 0 inText -1 TRUE 13 1 "Myriad Bold")))

Calling it is easier (no foundry or anything to remember), and the text is close, but not close enough.

I can actually get it right if I disable Hinting in the text tool options if I manually create the image, but there doesn't appear to be any way to control the hinting via script-fu. Is there some way I can set it to disabled globally so it will be disabled in script-fu too?

I have to create a *lot* of these images, so help would be much appreciated!

---------------------- Mark R. Andrachek, Jr.
hallow@webmages.com

Mark Andrachek, Jr.
2004-08-05 23:28:49 UTC (over 19 years ago)

script-fu text

Ok, turns out, I need to do both hinting and kerning (the letter spacing was off too). So, some searching found that I need to use plug-in-freetype, which takes care of all of this, and produces *perfect* text for me, at least in interactive mode.

I seem unable to specify the font_file correctly to be able to call it in non-interactive mode though. The font file name is actually "wmb_____.pfm". I've tried that, with and without the full path ("c:\Windows\fonts\wmb_____.pfm"), and I've tried the font name by itself ("Myriad Bold"). I am able to select the font correctly in interactive mode.

Any hints here?

---------------------- Mark R. Andrachek, Jr.
hallow@webmages.com

Sven Neumann
2004-08-05 23:49:01 UTC (over 19 years ago)

script-fu text

Hi,

"Mark Andrachek, Jr." writes:

I've got some script's I'm porting over from 1.2 to 2.0. (I'm using the windows version, if it makes a difference.)

There have been some changes, but I've gotten the scripts working again.

I had to add an alpha channel to my layers so I could raise/lower them, add gimp-edit-fill after gimp-edit-clear because of the alpha layer. I also had to change how I created my text layers, using gimp-text-fontname instead of gimp-text:

(tLayer (car (gimp-text myImage -1 0 0 inText -1 TRUE 110 1 "*" "Myriad Roman" "bold" "roman" "normal" "*" "*" "*")))

Changed to: (tLayer (car (gimp-text-fontname myImage -1 0 0 inText -1 TRUE 13 1 "Myriad Bold")))

Calling it is easier (no foundry or anything to remember), and the text is close, but not close enough.

Noone promised that 2.0 would create the same text output. Actually it has even been promised that it would definitely not create the same output. Simply because text rendering in 1.2 sucked a lot.

I can actually get it right if I disable Hinting in the text tool options if I manually create the image, but there doesn't appear to be any way to control the hinting via script-fu. Is there some way I can set it to disabled globally so it will be disabled in script-fu too?

No, there is (currently) no way to do that but hacking the gimp sources.

Sven

Sven Neumann
2004-08-06 01:20:51 UTC (over 19 years ago)

script-fu text

Hi,

"Mark Andrachek, Jr." writes:

So, some searching found that I need to use plug-in-freetype, which takes care of all of this, and produces *perfect* text for me, at least in interactive mode.

I seem unable to specify the font_file correctly to be able to call it in non-interactive mode though. The font file name is actually "wmb_____.pfm". I've tried that, with and without the full path ("c:\Windows\fonts\wmb_____.pfm"), and I've tried the font name by itself ("Myriad Bold"). I am able to select the font correctly in interactive mode.

You need to specify the full path to the font file. gimp-freetype doesn't use any .pfm files so you are simply passing the wrong filename here.

Sven

Mark Andrachek, Jr.
2004-08-06 03:35:10 UTC (over 19 years ago)

script-fu text

I seem unable to specify the font_file correctly to be able to call it in non-interactive mode though. The font file name is actually "wmb_____.pfm". I've tried that, with and without the full path ("c:\Windows\fonts\wmb_____.pfm"), and I've tried the font name by itself ("Myriad Bold"). I am able to select the font correctly in interactive mode.

Any hints here?

Well, I figured this one out on my own too. In my user directory was a dotfile (fonts-cache or something, not sitting in front of it right now) containing the list of font files and their properties. Using the exact text specified there for the font-file and it works. Changing the case of a single letter, and it breaks. Just a unix/win32 difference.

---------------------- Mark R. Andrachek, Jr.
hallow@webmages.com