[gimp] app, libgimp, pdb: add a note about unsupported markup.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp, pdb: add a note about unsupported markup.
- Date: Thu, 29 Sep 2022 23:00:37 +0000 (UTC)
commit 690949eb34bc71b7836fe47472f53f6e3ff8c34d
Author: Jehan <jehan girinstud io>
Date: Fri Sep 30 00:59:10 2022 +0200
app, libgimp, pdb: add a note about unsupported markup.
After re-reading #534, I realized I missed the discussion about unsupported
markup by the tool. Then I tested and confirmed what Ian Munsie initially said
in a comment: unsupported markups are properly rendered in the text layer, yet
are simply dropped when editing with the text tool.
This is actually the ideal behavior as it means that with the API, you can even
go further than what is currently possible with the GUI. So it gives nice powers
to people who can script GIMP. We still need some warning in the function
documentation to tell developers about this weakness in the tool GUI.
app/pdb/text-layer-cmds.c | 3 ++-
libgimp/gimptextlayer_pdb.c | 3 +++
pdb/groups/text_layer.pdb | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/app/pdb/text-layer-cmds.c b/app/pdb/text-layer-cmds.c
index b6c3c19a9d..9a83bf91b7 100644
--- a/app/pdb/text-layer-cmds.c
+++ b/app/pdb/text-layer-cmds.c
@@ -1350,7 +1350,8 @@ register_text_layer_procs (GimpPDB *pdb)
"gimp-text-layer-set-markup");
gimp_procedure_set_static_help (procedure,
"Set the markup for a text layer from a string.",
- "This procedure sets the markup of the styles for a text layer. The markup
should be in the form of Pango's markup - See https://docs.gtk.org/Pango/pango_markup.html for a reference.",
+ "This procedure sets the markup of the styles for a text layer. The markup
should be in the form of Pango's markup - See https://docs.gtk.org/Pango/pango_markup.html for a reference.\n"
+ "Note that GIMP's text tool does not support all of Pango markup. Any
unsupported markup will still be applied to your text layer, yet would be dropped as soon as you edit text
with the tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ian Munsie <darkstarsword gmail com>",
diff --git a/libgimp/gimptextlayer_pdb.c b/libgimp/gimptextlayer_pdb.c
index 03ebf73c88..9e50b8c426 100644
--- a/libgimp/gimptextlayer_pdb.c
+++ b/libgimp/gimptextlayer_pdb.c
@@ -215,6 +215,9 @@ gimp_text_layer_get_markup (GimpLayer *layer)
* This procedure sets the markup of the styles for a text layer. The
* markup should be in the form of Pango's markup - See
* https://docs.gtk.org/Pango/pango_markup.html for a reference.
+ * Note that GIMP's text tool does not support all of Pango markup. Any
+ * unsupported markup will still be applied to your text layer, yet
+ * would be dropped as soon as you edit text with the tool.
*
* Returns: TRUE on success.
*
diff --git a/pdb/groups/text_layer.pdb b/pdb/groups/text_layer.pdb
index fb44221d03..47b85da5c8 100644
--- a/pdb/groups/text_layer.pdb
+++ b/pdb/groups/text_layer.pdb
@@ -198,6 +198,10 @@ sub text_layer_set_markup {
This procedure sets the markup of the styles for a text layer.
The markup should be in the form of Pango's markup - See
https://docs.gtk.org/Pango/pango_markup.html for a reference.
+
+Note that GIMP's text tool does not support all of Pango markup. Any unsupported
+markup will still be applied to your text layer, yet would be dropped as soon as
+you edit text with the tool.
HELP
$author = 'Ian Munsie <darkstarsword gmail com>';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]