Re: [Gimp-developer] gimp images with text

2009-06-12 Thread Sven Neumann
Hi,

On Wed, 2009-06-10 at 14:48 +0200, Luke R. wrote:

 Could you give me some more detail on this?
 How does the mapping work?
 I am having a problem in particular with Avantgarde from foundry urw. It
 seems to be reverting to a more Helvetica-like font.

Just stop using the old-style font definition and use a fontconfig font
pattern instead. Have a look at the fontconfig documentation that is
most likely installed on your computer. My Debian system installs it
at /usr/share/doc/fontconfig/fontconfig-user.html


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] gimp images with text

2009-06-10 Thread Luke R.
 There seem to be a couple of problems. 
 When the $text contains anything other than [a-z], [A-Z], [0-9],
 gimp_text_get_extents fails, saying it was called with an invalid
argument.

You need to make sure that your text is in UTF-8 encoding.


Thanks. That fixed it.

 Also, when the code does create an image with text, I'm not convinced gimp
is
 using the font I'm requesting.

Font selection changed completely with GIMP 2.0. There's some
compatibility code that tries to map the X Logical Font Description font
names from the old days to a font-config font description, but this code
is probably not perfect.


Could you give me some more detail on this?
How does the mapping work?
I am having a problem in particular with Avantgarde from foundry urw. It
seems to be reverting to a more Helvetica-like font.

Thanks
Luke


-- 
Luke R. (via www.gimpusers.com)
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] gimp images with text

2009-06-09 Thread Luke R.
Hi

I'm trying to migrate a suite of legacy code running gimp 1.2 on Redhat to a
Debian platform and gimp 2.4 .

I am starting gimp with
/usr/bin/gimp --no-interface --console-messages --verbose --batch
'(extension-perl-server 1 0 0)'

The old perl code probably needs updating, but at the moment it calls
text_get_extents like so:

  return Gimp::text_get_extents(undef, $text, $size, PIXELS, $foundry, $font,
$weight, $slant, 'normal', '*', '*', '*');

There seem to be a couple of problems. 
When the $text contains anything other than [a-z], [A-Z], [0-9],
gimp_text_get_extents fails, saying it was called with an invalid argument.

Also, when the code does create an image with text, I'm not convinced gimp is
using the font I'm requesting.

Any help much appreciated.


-- 
Luke R. (via www.gimpusers.com)
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp images with text

2009-06-09 Thread Sven Neumann
Hi,

On Tue, 2009-06-09 at 18:15 +0200, Luke R. wrote:

 There seem to be a couple of problems. 
 When the $text contains anything other than [a-z], [A-Z], [0-9],
 gimp_text_get_extents fails, saying it was called with an invalid argument.

You need to make sure that your text is in UTF-8 encoding.

 Also, when the code does create an image with text, I'm not convinced gimp is
 using the font I'm requesting.

Font selection changed completely with GIMP 2.0. There's some
compatibility code that tries to map the X Logical Font Description font
names from the old days to a font-config font description, but this code
is probably not perfect.


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer