Text layer changes?

ForumsFor GIMP developers (read-only) ► Text layer changes?

Sent: 2010-03-03 16:29:46 UTC (almost 2 years ago)

From: LightningIsMyName

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

Sent: 2010-03-03 20:17:13 UTC (almost 2 years ago)

From: Sven Neumann

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

Sent: 2010-03-03 21:35:40 UTC (almost 2 years ago)

From: LightningIsMyName

Text layer changes?

Hello Sven,

On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann 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

Sent: 2010-03-03 22:49:05 UTC (almost 2 years ago)

From: Sven Neumann

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 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

Sent: 2010-03-30 23:28:47 UTC (almost 2 years ago)

From: LightningIsMyName

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 wrote:
>
> On Wed, 2010-03-03 at 22:35 +0200, LightningIsMyName wrote:
> > On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann 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

Sent: 2010-03-31 14:21:22 UTC (almost 2 years ago)

From: Michael Natterer

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 wrote:
> >
> > On Wed, 2010-03-03 at 22:35 +0200, LightningIsMyName wrote:
> > > On Wed, Mar 3, 2010 at 9:17 PM, Sven Neumann 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

Welcome!


Lost password?

Not a member? Sign up!

Random tutorials | Latest tutorials

  1. Cool glowing text Cool glowing text 40
  2. Smelting text / Creating blood text Smelting text / Creating blood text 37
  3. Crazy Ions Crazy Ions 4
  4. "Solar winds" graphics effect "Solar winds" graphics effect 7

Latest comments

A facebook page, could be great too! (about 14 hours ago in GIMP gets closer to the community with Google+!)

bah just use 2.7.4 (or 2.7.5 on Windows) (about 17 hours ago in Last stable 2.6 release: 2.6.12 has arrived)

Hmm, would prefer Diaspora, I don't use G+ myself, but I guess it h... (about 18 hours ago in GIMP gets closer to the community with Google+!)

Poll

Is GIMP an adequate application for you to create printed graphics like flyers, advertisments etc?

Latest forum activities

Your Ad Here

facts & numbers

gimpusers.com RSS feed

48 identi.ca followers
745 Twitter followers

powered by bitfire it services