Skip to content

有点不是很明白的地方 #1

Description

@PhilCai1993

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions