From b5be2317201774c84470167767ad83c8637cad5b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 5 Jun 2014 19:00:22 -0400 Subject: [PATCH] [gsub] Adjust single-length ligature subst to act like single subst --- src/hb-ot-layout-gsub-table.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 60e292eea..d73ddc1d9 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -638,6 +638,14 @@ struct Ligature if (unlikely (!count)) return TRACE_RETURN (false); + /* Special-case to make it in-place and not consider this + * as a "ligated" substitution. */ + if (unlikely (count == 1)) + { + c->replace_glyph (ligGlyph); + return TRACE_RETURN (true); + } + bool is_mark_ligature = false; unsigned int total_component_count = 0;