Loading ...
Sorry, an error occurred while loading the content.

Text layer in script

Expand Messages
  • Xavier PITEL
    Hi, I am trying to write a script-fu where I need to change the text written in an existing text layer. I haven t found a way to change the text (or at least
    Message 1 of 6 , Jan 7, 2005
    View Source
    • 0 Attachment
      Hi,

      I am trying to write a script-fu where I need to change the text written in
      an existing text layer. I haven't found a way to change the text (or at
      least to popup the text editor) straightforwardly, so I guess I have to
      create a new text layer and delete the old one. But I need text information
      for that layer, namely font and size.
      I could do without size, trying until the extends needed for this font
      matches the extends of the old text layer, but I need at least to know the
      font. Gimp-context-get-font gets the currently active font, which means if
      the user changes font between the creation of the old text layer and the
      creation of the new text layer, I can't figure out the proper size of font.

      So my questions are:
      1. Is there a simple way to change the text of a text layer by script-fu or,
      at least, to popup the text editor?
      2. Is there a way to get font and size information for a given text layer?
      3. Is there a way to force the active font to be the same as a given text
      layer?

      Thanks very much for your answers.

      Regards,
      Xavier PITEL
    • Kevin Cozens
      ... You are more or less out of luck on this at the moment. It is a known problem that the text API in GIMP needs improvement. One possibility would be to
      Message 2 of 6 , Jan 7, 2005
      View Source
      • 0 Attachment
        Xavier PITEL wrote:

        >So my questions are:
        >1. Is there a simple way to change the text of a text layer by script-fu or,
        >at least, to popup the text editor?
        >2. Is there a way to get font and size information for a given text layer?
        >3. Is there a way to force the active font to be the same as a given text
        >layer?
        >
        >
        You are more or less out of luck on this at the moment. It is a known
        problem that the text API in GIMP needs improvement. One possibility
        would be to write a plug-in to obtain the information you need.
      • Xavier PITEL
        OK, I ll choose a clumsy solution until I have time to dive into Gimp plug-ins or the API is improved. Thanks anyway. Xavier ... De : Kevin Cozens
        Message 3 of 6 , Jan 7, 2005
        View Source
        • 0 Attachment
          OK, I'll choose a clumsy solution until I have time to dive into Gimp
          plug-ins or the API is improved.
          Thanks anyway.

          Xavier

          -----Message d'origine-----
          De : Kevin Cozens [mailto:kcozens@...]
          Envoyé : vendredi 7 janvier 2005 17:11
          À : script-fu@yahoogroups.com
          Objet : Re: [script-fu] Text layer in script


          Xavier PITEL wrote:

          >So my questions are:
          >1. Is there a simple way to change the text of a text layer by script-fu
          or,
          >at least, to popup the text editor?
          >2. Is there a way to get font and size information for a given text layer?
          >3. Is there a way to force the active font to be the same as a given text
          >layer?
          >
          >
          You are more or less out of luck on this at the moment. It is a known
          problem that the text API in GIMP needs improvement. One possibility
          would be to write a plug-in to obtain the information you need.




          Yahoo! Groups Links








          __________ NOD32 1.965 (20050106) Information __________

          This message was checked by NOD32 antivirus system.
          http://www.nod32.com
        • Joao S. O. Bueno Calligaris
          ... Actually, writitng a plug-in would not help muh - this information is not avilable to plug-ins either. We have to a) formulate a resoanble, sane and
          Message 4 of 6 , Jan 7, 2005
          View Source
          • 0 Attachment
            On Friday 07 January 2005 14:22, Xavier PITEL wrote:
            > OK, I'll choose a clumsy solution until I have time to dive into
            > Gimp plug-ins or the API is improved.
            > Thanks anyway.

            Actually, writitng a plug-in would not help muh - this information is
            not avilable to plug-ins either.

            We have to
            a) formulate a resoanble, sane and extensible API for the text tool

            You could help trying to write just that, suggesting functions, even
            function calls for things that are not there yet, but are likely to
            be soon, like text rotation. and posting that in the apropriate entry
            in bugzilla.gnome.org (search for a bug requesting such features in
            the GIMP, or if there is none ther eyet, create one)

            As for the script now, the work around I could think off is to create
            the text layer from within the script, or a sibling script, asking
            for the text and font informations. Them, along with the creation of
            the text layer, you could record this information in a parasite, like
            the old dynamic text used to do. At each update, yoyu them delete the
            text layer, and recreate it with the information stroed in the
            parasite(s).


            Regards,
            JS
            -><-







            >
            > Xavier
            >
            > -----Message d'origine-----
            > De : Kevin Cozens [mailto:kcozens@...]
            > Envoyé : vendredi 7 janvier 2005 17:11
            > À : script-fu@yahoogroups.com
            > Objet : Re: [script-fu] Text layer in script
            >
            > Xavier PITEL wrote:
            > >So my questions are:
            > >1. Is there a simple way to change the text of a text layer by
            > > script-fu
            >
            > or,
            >
            > >at least, to popup the text editor?
            > >2. Is there a way to get font and size information for a given
            > > text layer? 3. Is there a way to force the active font to be the
            > > same as a given text layer?
            >
            > You are more or less out of luck on this at the moment. It is a
            > known problem that the text API in GIMP needs improvement. One
            > possibility would be to write a plug-in to obtain the information
            > you need.
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
            > __________ NOD32 1.965 (20050106) Information __________
            >
            > This message was checked by NOD32 antivirus system.
            > http://www.nod32.com
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
          • Xavier PITEL
            Joao, I m trying to figure out what parasites are. Are those parasites deleted when you close GIMP, or do you find them again when you reopen an image? If not,
            Message 5 of 6 , Jan 7, 2005
            View Source
            • 0 Attachment
              Joao,

              I'm trying to figure out what parasites are. Are those parasites deleted
              when you close GIMP, or do you find them again when you reopen an image? If
              not, I will record this information in the text layer name, and then get
              them from here.

              Thanks,
              Xavier

              -----Message d'origine-----
              De : Joao S. O. Bueno Calligaris [mailto:gwidion@...]
              Envoyé : vendredi 7 janvier 2005 17:39
              À : script-fu@yahoogroups.com
              Objet : Re: [script-fu] Text layer in script


              On Friday 07 January 2005 14:22, Xavier PITEL wrote:
              > OK, I'll choose a clumsy solution until I have time to dive into
              > Gimp plug-ins or the API is improved.
              > Thanks anyway.

              Actually, writitng a plug-in would not help muh - this information is
              not avilable to plug-ins either.

              We have to
              a) formulate a resoanble, sane and extensible API for the text tool

              You could help trying to write just that, suggesting functions, even
              function calls for things that are not there yet, but are likely to
              be soon, like text rotation. and posting that in the apropriate entry
              in bugzilla.gnome.org (search for a bug requesting such features in
              the GIMP, or if there is none ther eyet, create one)

              As for the script now, the work around I could think off is to create
              the text layer from within the script, or a sibling script, asking
              for the text and font informations. Them, along with the creation of
              the text layer, you could record this information in a parasite, like
              the old dynamic text used to do. At each update, yoyu them delete the
              text layer, and recreate it with the information stroed in the
              parasite(s).


              Regards,
              JS
              -><-







              >
              > Xavier
              >
              > -----Message d'origine-----
              > De : Kevin Cozens [mailto:kcozens@...]
              > Envoyé : vendredi 7 janvier 2005 17:11
              > À : script-fu@yahoogroups.com
              > Objet : Re: [script-fu] Text layer in script
              >
              > Xavier PITEL wrote:
              > >So my questions are:
              > >1. Is there a simple way to change the text of a text layer by
              > > script-fu
              >
              > or,
              >
              > >at least, to popup the text editor?
              > >2. Is there a way to get font and size information for a given
              > > text layer? 3. Is there a way to force the active font to be the
              > > same as a given text layer?
              >
              > You are more or less out of luck on this at the moment. It is a
              > known problem that the text API in GIMP needs improvement. One
              > possibility would be to write a plug-in to obtain the information
              > you need.
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >
              > __________ NOD32 1.965 (20050106) Information __________
              >
              > This message was checked by NOD32 antivirus system.
              > http://www.nod32.com
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
              >
              >



              Yahoo! Groups Links








              __________ NOD32 1.965 (20050106) Information __________

              This message was checked by NOD32 antivirus system.
              http://www.nod32.com
            • Joao S. O. Bueno Calligaris
              ... Hi, thre is a a presistent attribute to parasites. If set, the parasite is recorded in a image s XCF file.
              Message 6 of 6 , Jan 7, 2005
              View Source
              • 0 Attachment
                On Friday 07 January 2005 15:56, Xavier PITEL wrote:
                > Joao,
                >
                > I'm trying to figure out what parasites are. Are those parasites
                > deleted when you close GIMP, or do you find them again when you
                > reopen an image? If not, I will record this information in the text
                > layer name, and then get them from here.
                >

                Hi, thre is a a "presistent" attribute to parasites. If set, the
                parasite is recorded in a image's XCF file.
                > Thanks,
                > Xavier
                >
                > -----Message d'origine-----
                > De : Joao S. O. Bueno Calligaris [mailto:gwidion@...]
                > Envoyé : vendredi 7 janvier 2005 17:39
                > À : script-fu@yahoogroups.com
                > Objet : Re: [script-fu] Text layer in script
                >
                > On Friday 07 January 2005 14:22, Xavier PITEL wrote:
                > > OK, I'll choose a clumsy solution until I have time to dive into
                > > Gimp plug-ins or the API is improved.
                > > Thanks anyway.
                >
                > Actually, writitng a plug-in would not help muh - this information
                > is not avilable to plug-ins either.
                >
                > We have to
                > a) formulate a resoanble, sane and extensible API for the text tool
                >
                > You could help trying to write just that, suggesting functions,
                > even function calls for things that are not there yet, but are
                > likely to be soon, like text rotation. and posting that in the
                > apropriate entry in bugzilla.gnome.org (search for a bug requesting
                > such features in the GIMP, or if there is none ther eyet, create
                > one)
                >
                > As for the script now, the work around I could think off is to
                > create the text layer from within the script, or a sibling script,
                > asking for the text and font informations. Them, along with the
                > creation of the text layer, you could record this information in a
                > parasite, like the old dynamic text used to do. At each update,
                > yoyu them delete the text layer, and recreate it with the
                > information stroed in the parasite(s).
                >
                >
                > Regards,
                > JS
                > -><-
                >
                > > Xavier
                > >
                > > -----Message d'origine-----
                > > De : Kevin Cozens [mailto:kcozens@...]
                > > Envoyé : vendredi 7 janvier 2005 17:11
                > > À : script-fu@yahoogroups.com
                > > Objet : Re: [script-fu] Text layer in script
                > >
                > > Xavier PITEL wrote:
                > > >So my questions are:
                > > >1. Is there a simple way to change the text of a text layer by
                > > > script-fu
                > >
                > > or,
                > >
                > > >at least, to popup the text editor?
                > > >2. Is there a way to get font and size information for a given
                > > > text layer? 3. Is there a way to force the active font to be
                > > > the same as a given text layer?
                > >
                > > You are more or less out of luck on this at the moment. It is a
                > > known problem that the text API in GIMP needs improvement. One
                > > possibility would be to write a plug-in to obtain the information
                > > you need.
                > >
                > >
                > >
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                > > __________ NOD32 1.965 (20050106) Information __________
                > >
                > > This message was checked by NOD32 antivirus system.
                > > http://www.nod32.com
                > >
                > >
                > >
                > >
                > > Yahoo! Groups Links
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >
                >
                > __________ NOD32 1.965 (20050106) Information __________
                >
                > This message was checked by NOD32 antivirus system.
                > http://www.nod32.com
                >
                >
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.