[gimp] Issue #2509: Adding support for 'locl' in Text Tool



commit b48286009e87714d2ff879629788d967a137a450
Author: Nikc <nikcdc gmail com>
Date:   Wed Mar 9 17:53:19 2022 +0000

    Issue #2509: Adding support for 'locl' in Text Tool

 app/text/gimptextlayout.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c
index 56c670ea0b..3d77c3d89c 100644
--- a/app/text/gimptextlayout.c
+++ b/app/text/gimptextlayout.c
@@ -508,6 +508,15 @@ gimp_text_layout_apply_tags (GimpTextLayout *layout,
     result = g_strdup_printf ("<span color=\"#%02x%02x%02x\">%s</span>",
                               r, g, b, markup);
   }
+  /* Updating font 'locl' (if supported) with 'lang' feature tag */
+  if (text->language)
+    {
+      gchar *tmp = g_strdup_printf ("<span lang=\"%s\">%s</span>",
+                                    text->language,
+                                    result);
+      g_free (result);
+      result = tmp;
+    }
 
   if (fabs (text->letter_spacing) > 0.1)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]