[directwrite] Use correct UTF-16 string length

Fixes https://github.com/harfbuzz/harfbuzz/issues/2474
pull/2951/head
Khaled Hosny 4 years ago committed by Behdad Esfahbod
parent 668acff1f0
commit e116058bba
  1. 2
      src/hb-directwrite.cc

@ -623,7 +623,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
* but we never attempt to shape a word longer than 64K characters
* in a single gfxShapedWord, so we cannot exceed that limit.
*/
uint32_t textLength = buffer->len;
uint32_t textLength = chars_len;
TextAnalysis analysis (textString, textLength, nullptr, readingDirection);
TextAnalysis::Run *runHead;

Loading…
Cancel
Save