aboutsummaryrefslogtreecommitdiff
path: root/src/hb-ot-shape.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/hb-ot-shape.cc')
-rw-r--r--src/hb-ot-shape.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index d84313f19..90f596ae7 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -476,9 +476,18 @@ hb_set_unicode_props (hb_buffer_t *buffer)
{
_hb_glyph_info_set_unicode_props (&info[i], buffer);
+ unsigned gen_cat = _hb_glyph_info_get_general_category (&info[i]);
+ if (FLAG_UNSAFE (gen_cat) &
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) |
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR)))
+ continue;
+
/* Marks are already set as continuation by the above line.
* Handle Emoji_Modifier and ZWJ-continuation. */
- if (unlikely (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL &&
+ if (unlikely (gen_cat == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL &&
hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F3FBu, 0x1F3FFu)))
{
_hb_glyph_info_set_continuation (&info[i]);
@@ -756,6 +765,14 @@ hb_ot_shape_setup_masks_fraction (const hb_ot_shape_context_t *c)
_hb_glyph_info_get_general_category (&info[end]) ==
HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER)
end++;
+ if (start == i || end == i + 1)
+ {
+ if (start == i)
+ buffer->unsafe_to_concat (start, start + 1);
+ if (end == i + 1)
+ buffer->unsafe_to_concat (end - 1, end);
+ continue;
+ }
buffer->unsafe_to_break (start, end);
@@ -1037,7 +1054,7 @@ hb_ot_position_plan (const hb_ot_shape_context_t *c)
* direction is backward we don't shift and it will end up
* hanging over the next glyph after the final reordering.
*
- * Note: If fallback positinoing happens, we don't care about
+ * Note: If fallback positioning happens, we don't care about
* this as it will be overridden.
*/
bool adjust_offsets_when_zeroing = c->plan->adjust_mark_positioning_when_zeroing &&