简体   繁体   中英

How do I determine the of a CTLine following a CTLine

I have a CTLine and I can get the typographic bounds, but that does not tell me how much space there will be after this line and before the next.

Do I have to go through the paragraph styles and determine the maximum paragraph spacing after this line through that, or is there a simpler approach to determine the offset one would use with CTTypesetterCreateLineWithOffset?

您可以使用CTFramesetter从属性字符串中获取CTFrame ,然后使用CTFrameGetLineOrigins()拉出垂直间距。

Answer: there is no public CoreText function that calculates this. You have to calculate it yourself unforunately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM