summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-29 04:40:30 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-07-29 04:40:30 +0000
commit3b549d4d356b21094add8186bc1f80447047c4c5 (patch)
tree8648279f11fe52486ad6de85caae9e80343b084c
parent07957aea43f68eafad2ec3e8b00d189df71b31b8 (diff)
parent2c64379a6d663ff57a19b7852e401bfb9a551f48 (diff)
downloadpango-3b549d4d356b21094add8186bc1f80447047c4c5.tar.gz
Merge branch 'letterspacing-liga' into 'master'
Turn off ligatures when letterspacing Closes #182 See merge request GNOME/pango!108
-rw-r--r--pango/pangofc-shape.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index c2b8dc3e..a4fd9a32 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -110,6 +110,29 @@ apply_extra_attributes (GSList *attrs,
}
}
}
+
+ /* Turn off ligatures when letterspacing */
+ for (l = attrs; l && *num_features < length; l = l->next)
+ {
+ PangoAttribute *attr = l->data;
+ if (attr->klass->type == PANGO_ATTR_LETTER_SPACING)
+ {
+ hb_tag_t *tags[] = {
+ HB_TAG('l','i','g','a'),
+ HB_TAG('c','l','i','g'),
+ HB_TAG('d','l','i','g'),
+ };
+ int i;
+ for (i = 0; i < G_N_ELEMENTS (tags); i++)
+ {
+ features[*num_features].tag = tags[i];
+ features[*num_features].value = 0;
+ features[*num_features].start = attr->start_index;
+ features[*num_features].end = attr->end_index;
+ (*num_features)++;
+ }
+ }
+ }
}
typedef struct