You wrote on Die, 18 Apr 2000:
>> > > Where are you experts???  We are two at minimum discovering this behaviour
>> > > and if it's a misconfiguration it has to be described somewhere.
>> > 
>> > It is a misconfiguration on your part.  I'm running gimp 1.1.19 from
>> > debian and GDynText appears to be working fine.  I typed text and it
>> > appeared in a new layer.
>> I'm afraid Uwe's original report is correct. GDynText is totally
>> broken when used under any locale, because it seems to do bad
>> thing to the X font spec's "encoding" field. I'm thinking about
>> hacking it but I don't promise anything :)

Hey, you are right!  By starting gimp with

    LC_ALL=C gimp-1.1

or more exact

    LC_NUMERIC=C gimp-1.1

gdyntext works as expected.  Maybe this is the same sort of error acrobat
reader 4.05 has to fight with (cannot open most embedded font when run with
locale other than "C").

>No, this problem is definitely configuration-specific. I have no problems
>with GDynText on this debian (potato) system running gimp under whatever 
>locale I like.

But what's wrong with my configuration?  The locales are straight from

    localedef -i de_DE -f ISO-8859-1 de

The definition of LC_NUMERIC:
    decimal_point     "<comma>"
    thousands_sep     "<period>"
    grouping          3;0

Good news if this is no gimp bug, but it falls on gimp if gimp isn't able
to work with this special (mis)configuration. 

I will go into it -- and I am glad to hear from you ;-)

I have done some tests with gimp-1.1.19 and gdyntext-1.4.4 (-DDEBUG)
  LANG=de gimp-1.1
Loading font: -*-agate-bold-r-normal-*-50-*-*-*-*-*-*-*
GDT: space width = 2
GDT:   16x   5 A:  4 D:  1 [Test]
GDT: MH:5 LH:4
  LC_NUMERIC=C gimp-1.1
Loading font: -*-agate-bold-r-normal-*-50-*-*-*-*-*-*-*
GDT: space width = 18
GDT:   87x  50 A: 38 D: 12 [test]
GDT: MH:50 LH:32

Then I tried to give the same command that gdyntext uses in the script-fu
console with LANG=de:
  (gimp-text-get-extents "A A" 50 PIXELS "*" "agate" "bold" "r"
      "normal" "*" "*" "*") 
    (100 50 38 12)
  (gimp-text-get-extents "AA" 50 PIXELS "*" "agate" "bold" "r"
      "normal" "*" "*" "*")
    (82 50 38 12)

As you can see the result is correct (100 - 82 = 18)

Debugging with ddd (gdb-4.18) shows that all parameter are correct.

Where in gdyntext.c or in gimp_run_procedure() is a function that uses the
LC_NUMERIC locale setting -- that is not used by scrip-fu???


--                                    --
right now the web page is in german only
but this will change as time goes by ;-)

Reply via email to