TextKitAndAnimationEffect icon indicating copy to clipboard operation
TextKitAndAnimationEffect copied to clipboard

有点不是很明白的地方

Open PhilCai1993 opened this issue 9 years ago • 0 comments

frame.size.width += CGRectGetMaxX(glyphRect) - CGRectGetMaxX(frame)

这个是让前面的一个layer的宽度放大, 防止这个layer截断glyph?但是放大的值是 CGRectGetMaxX(glyphRect) - CGRectGetMaxX(frame),是为什么呢? 拿单词“WAY”举例,每个字母都有那个kerning, "我们需要将前一个 textLayer 取出来调整其 Rect 的宽度至新的 glyphRect 的最右边"看到文章是这么说的,但是实际上我看到的结果是:“W”的layer的宽度是到了“Y”的最左边,而不是“A”的最右边,是需要这个效果吗?

PhilCai1993 avatar Apr 07 '16 08:04 PhilCai1993