且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

核心文本 - 如何知道文本是否从右到左

更新时间:2023-12-04 21:19:46

我没有使用 CTRun 的实践经验,但从文档看来

I do not have practical experience with CTRun, but from the documentation is seems that

 CTRunStatus CTRunGetStatus(CTRunRef run)

返回你需要的信息,返回值是一个位域:

returns the information you need, the return value is a bitfield:

enum {
   kCTRunStatusNoStatus = 0,
   kCTRunStatusRightToLeft = (1 << 0),
   kCTRunStatusNonMonotonic = (1 << 1),
   kCTRunStatusHasNonIdentityMatrix = (1 << 2)
};
typedef uint32_t CTRunStatus;