gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-user | today 10:48 AM
    Suppressing the "press any character to close this window" message in Script-Fu
  2. gimp-developer | today 10:45 AM
    Help with new default resources in 2.8
  3. gimp-docs | today 10:34 AM
    Where does the HTML documentation
  4. gimp-developer | today 09:34 AM
    html layers
  5. gimp-developer | today 08:50 AM
    Please fix Color and/or Value transfer mode

External news

Poll

Would you like to see or even participate in GFX contests hosted by gimpusers.com?

Yes, but prices for winners are important!

Yes, GFX contests are a good idea! It brings community together even if there are no prices available

No, contests are not important

Maybe, it is however not a tragedy if there are no contests. I don't care much.

See results

Stats

gimpusers.com RSS feed

GIMP Forums » For GIMP developers

Text layer changes?

Jump to message:

  1. Text layer changes? — LightningIsMyName, 03 Mar 2010 04:29 PM
    1. Text layer changes? — Sven Neumann, 03 Mar 2010 08:17 PM
      1. Text layer changes? — LightningIsMyName, 03 Mar 2010 09:35 PM
        1. Text layer changes? — Sven Neumann, 03 Mar 2010 10:49 PM
          1. Text layer changes? — LightningIsMyName, 30 Mar 2010 11:28 PM
            1. Text layer changes? — Michael Natterer, 31 Mar 2010 02:21 PM

As a registered user, you can subscribe forum threads in order to get notified when replies are posted. Just log in at the right top of the page if you already have an account, otherwise you can register for free.

Permalink:e926d4dc1003030729l29261615la8d6688f8...
Date:03 Mar 2010 04:29 PM
From:LightningIsMyName
Subject:Text layer changes?
Hello,

I have seen in my latest GIMP build that the new text layer allows us
to style different parts of the text in different styles. This is an
amazing feature (I waited for it for a long time), but it's a pain in
the neck for my PDF export plugin (see here
https://bugzilla.gnome.org/show_bug.cgi?id=382688 )

Is there any way in which I can acces the style of the text? I can
easily add a PDB procedure (to the GIMP's source) to export the
PangoTextLayout object to plugins for using, but I doubt that it's a
good idea (Since exposing the internal structure will be a big problem
in backwards comptiablility if we ever change from pango).

The other option which I can think off, is something that will work
but will not be ideal. This is to expose a function that renders a
text layer to a cairo surface. This way, for vector surfaces It will
still be a vector instead of bitmap, and it won't be any trouble for
the programmer.
However, this method also has many problems...

Can anyone give me any hint on what should I do?

Thanks,
LightningIsMyName
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:1267643842.29748.15.camel@bender
Date:03 Mar 2010 08:17 PM
From:Sven Neumann
Subject:Text layer changes?
On Wed, 2010-03-03 at 17:29 +0200, LightningIsMyName wrote:

> I have seen in my latest GIMP build that the new text layer allows us
> to style different parts of the text in different styles. This is an
> amazing feature (I waited for it for a long time), but it's a pain in
> the neck for my PDF export plugin (see here
> https://bugzilla.gnome.org/show_bug.cgi?id=382688 )
>
> Is there any way in which I can acces the style of the text?=

Such a way will have to be added of course. We usually add the core
functionality first, then expose it to plug-ins. It's easier this way
around.

It should be unproblematic to add a procedure that exposes the new
"markup" property of the text object.


Sven
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:e926d4dc1003031235t3f26de58o15adef9d6...
Date:03 Mar 2010 09:35 PM
From:LightningIsMyName
Subject:Text layer changes?
Hello Sven,

On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann <sven@gimp.org> wrote:
>> Is there any way in which I can acces the style of the text?=
>
> Such a way will have to be added of course. We usually add the core
> functionality first, then expose it to plug-ins. It's easier this way
> around.
>
> It should be unproblematic to add a procedure that exposes the new
> "markup" property of the text object.

OK, I found the markup property you are mentioned - It shouldn't be
too problomatic to extract it (I'll probably be able to add the patch
myself). However, before I continue working on the plugin, are there
any other upcoming changes in the text-engine which will affect the
plugin?

And another thing - with al the late discussions about color profiles,
It made me wonder: exporting a PDF via cairo does not support color
profiles. Do we need to warn the user if the image has some specific
color profile, that the PDF will be exported in the default RGB
profile? Or do we continue to stick to the fact that this is an extra
feature (andnot a complete feature with CMYK and other PDF related
features) in gimp and therfor we don't need to warn about such errors
that don't bother most of the users?

Thanks for your help,
~LightningIsMyName
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:1267652953.29748.27.camel@bender
Date:03 Mar 2010 10:49 PM
From:Sven Neumann
Subject:Text layer changes?
On Wed, 2010-03-03 at 22:35 +0200, LightningIsMyName wrote:
> On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann <sven@gimp.org> wrote:
> >> Is there any way in which I can acces the style of the text?=
> >
> > Such a way will have to be added of course. We usually add the core
> > functionality first, then expose it to plug-ins. It's easier this way
> > around.
> >
> > It should be unproblematic to add a procedure that exposes the new
> > "markup" property of the text object.
>
> OK, I found the markup property you are mentioned - It shouldn't be
> too problomatic to extract it (I'll probably be able to add the patch
> myself). However, before I continue working on the plugin, are there
> any other upcoming changes in the text-engine which will affect the
> plugin?

Almost certainly. The feature is brand-new, you should give it some time
to settle.

> And another thing - with al the late discussions about color profiles,
> It made me wonder: exporting a PDF via cairo does not support color
> profiles. Do we need to warn the user if the image has some specific
> color profile, that the PDF will be exported in the default RGB
> profile? Or do we continue to stick to the fact that this is an extra
> feature (andnot a complete feature with CMYK and other PDF related
> features) in gimp and therfor we don't need to warn about such errors
> that don't bother most of the users?

Almost all our file plug-ins are missing color profile support and we
don't warn users in any of them.


Sven
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:e926d4dc1003301428j32b756e4g29d6c117c...
Date:30 Mar 2010 11:28 PM
From:LightningIsMyName
Subject:Text layer changes?
Hello,

I took a look on the commit logs, and I haven't seen any update to the
text tool which should affect exporting it's markup, in the last 3
weeks.
So now it's time at least discuss which kind of export do we want for
the markup:

- Do we want an export which exports pango's markup directly? Although
this should be the easiest technique, it might be a burden if for some
reason we change to a different text-rendering library in the future
(This shouldn't happen, right? If so, this is probably OK)

- Do we want an export which exports to some HTML and CSS combination?
Right now pango does something very close to this, however it includes
some attributes which should be inside a style attribute in valid CSS.
This is less "pango-dependant" and it is probably a better idea to use
valid HTML/CSS if we want to allow other uses of the exported text
(instead of just usage with Pango as in the PDF plugin).
Note however that in this case, there are some elements that it's
unclear how to export since Pango's markup supports several attributes
(such as "fallback") which HTML and CSS don't support.

- Other export format?

I obviously tend to like the first option more (Pango-style markup)
since it requires no writing of convertors for the markup from our
current internal represenation, and as far as I know Pango is here to
stay.
If this option is indeed the way to go, I have a fixed code ready that
I can create the patch from.

I'll continue working on the PDF plugin as soon as we are done with this =)
LightningIsMyName

On Thu, Mar 4, 2010 at 12:49 AM, Sven Neumann <sven@gimp.org> wrote:
>
> On Wed, 2010-03-03 at 22:35 +0200, LightningIsMyName wrote:
> > On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann <sven@gimp.org> wrote:
> > >> Is there any way in which I can acces the style of the text?=
> > >
> > > Such a way will have to be added of course. We usually add the core
> > > functionality first, then expose it to plug-ins. It's easier this way
> > > around.
> > >
> > > It should be unproblematic to add a procedure that exposes the new
> > > "markup" property of the text object.
> >
> > OK, I found the markup property you are mentioned - It shouldn't be
> > too problomatic to extract it (I'll probably be able to add the patch
> > myself). However, before I continue working on the plugin, are there
> > any other upcoming changes in the text-engine which will affect the
> > plugin?
>
> Almost certainly. The feature is brand-new, you should give it some time
> to settle.
>
> > And another thing - with al the late discussions about color profiles,
> > It made me wonder: exporting a PDF via cairo does not support color
> > profiles. Do we need to warn the user if the image has some specific
> > color profile, that the PDF will be exported in the default RGB
> > profile? Or do we continue to stick to the fact that this is an extra
> > feature (andnot a complete feature with CMYK and other PDF related
> > features) in gimp and therfor we don't need to warn about such errors
> > that don't bother most of the users?
>
> Almost all our file plug-ins are missing color profile support and we
> don't warn users in any of them.
>
>
> Sven
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview
Permalink:1270038082.6224.10.camel@localhost
Date:31 Mar 2010 02:21 PM
From:Michael Natterer
Subject:Text layer changes?
On Wed, 2010-03-31 at 00:28 +0300, LightningIsMyName wrote:
> Hello,
>
> I took a look on the commit logs, and I haven't seen any update to the
> text tool which should affect exporting it's markup, in the last 3
> weeks.

That is because I didn't have much time, and is no indication that
the text tool is finished. There are in fact a lot of things left,
also with the internal representation.

> So now it's time at least discuss which kind of export do we want for
> the markup:
>
> - Do we want an export which exports pango's markup directly? Although
> this should be the easiest technique, it might be a burden if for some
> reason we change to a different text-rendering library in the future
> (This shouldn't happen, right? If so, this is probably OK)
>
> - Do we want an export which exports to some HTML and CSS combination?
> Right now pango does something very close to this, however it includes
> some attributes which should be inside a style attribute in valid CSS.
> This is less "pango-dependant" and it is probably a better idea to use
> valid HTML/CSS if we want to allow other uses of the exported text
> (instead of just usage with Pango as in the PDF plugin).
> Note however that in this case, there are some elements that it's
> unclear how to export since Pango's markup supports several attributes
> (such as "fallback") which HTML and CSS don't support.
>
> - Other export format?
>
> I obviously tend to like the first option more (Pango-style markup)
> since it requires no writing of convertors for the markup from our
> current internal represenation, and as far as I know Pango is here to
> stay.
> If this option is indeed the way to go, I have a fixed code ready that
> I can create the patch from.

It's most likely going to be pango markup. However, since GIMP will
only understand pango markup it produced itself, let's call it
GIMP markup right away. But as said, the exact set of features
is undecided, and there is currently even a bad hack involved
internally.

> I'll continue working on the PDF plugin as soon as we are done with this =)
> LightningIsMyName

Great :) Let's discuss the details in #gimp some time next week.

ciao,
--mitch

> On Thu, Mar 4, 2010 at 12:49 AM, Sven Neumann <sven@gimp.org> wrote:
> >
> > On Wed, 2010-03-03 at 22:35 +0200, LightningIsMyName wrote:
> > > On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann <sven@gimp.org> wrote:
> > > >> Is there any way in which I can acces the style of the text?=
> > > >
> > > > Such a way will have to be added of course. We usually add the core
> > > > functionality first, then expose it to plug-ins. It's easier this way
> > > > around.
> > > >
> > > > It should be unproblematic to add a procedure that exposes the new
> > > > "markup" property of the text object.
> > >
> > > OK, I found the markup property you are mentioned - It shouldn't be
> > > too problomatic to extract it (I'll probably be able to add the patch
> > > myself). However, before I continue working on the plugin, are there
> > > any other upcoming changes in the text-engine which will affect the
> > > plugin?
> >
> > Almost certainly. The feature is brand-new, you should give it some time
> > to settle.
> >
> > > And another thing - with al the late discussions about color profiles,
> > > It made me wonder: exporting a PDF via cairo does not support color
> > > profiles. Do we need to warn the user if the image has some specific
> > > color profile, that the PDF will be exported in the default RGB
> > > profile? Or do we continue to stick to the fact that this is an extra
> > > feature (andnot a complete feature with CMYK and other PDF related
> > > features) in gimp and therfor we don't need to warn about such errors
> > > that don't bother most of the users?
> >
> > Almost all our file plug-ins are missing color profile support and we
> > don't warn users in any of them.
> >
> >
> > Sven
>
_______________________________________________
> Gimp-developer mailing list
> Gimp-developer@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
↑Back to thread overview

Adobe® Photoshop® is a registered trademark of Adobe Systems, Inc. Linux is a trademark of Linus Torvalds. Ubuntu and Canonical are registered trademarks of Canonical Ltd. | Clock times are shown as CET / CEST | Imprint / Privacy policy | powered by bitfire it services | sponsored by Hirners Hotel Guide