diff --git a/ios/Text/RNSVGTSpan.m b/ios/Text/RNSVGTSpan.m index 797a1277..489cb8cb 100644 --- a/ios/Text/RNSVGTSpan.m +++ b/ios/Text/RNSVGTSpan.m @@ -689,7 +689,7 @@ static double RNSVGTSpan_radToDeg = 180 / M_PI; CTRunGetStringIndices(run, CFRangeMake(0, 0), indices); CTFontRef runFont = CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName); CTFontGetAdvancesForGlyphs(runFont, kCTFontOrientationHorizontal, glyphs, advances, runGlyphCount); - CFIndex nextOrEndRunIndex = n - 1; + CFIndex nextOrEndRunIndex = n; if (r + 1 < runEnd) { CTRunRef nextRun = CFArrayGetValueAtIndex(runs, r + 1); CFIndex nextRunGlyphCount = CTRunGetGlyphCount(nextRun);