-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
首先,非常感谢您的写出这么棒的代码。
我在使用Swift调用的时候:
let myString = "测试测试"
let myAttribute = [NSAttributedString.Key.foregroundColor: UIColor.red]
let myAttrString = NSAttributedString(string: myString, attributes: myAttribute)
hintLabel = FOTextView()
hintLabel.isVertical = true
hintLabel.attString = myAttrString
hintLabel.backgroundColor = UIColor.clear
self.view.addSubview(hintLabel)
发现在垂直排布的时候,无法正常显示我设置的文字颜色。
调试发现,在 'FOTextLayout.m'中,下列的fillColor为nil,无法获取到字体颜色。
CGColorRef fillColor = (CGColorRef)CFDictionaryGetValue(runAttrs, kCTForegroundColorAttributeName);
fillColor = FOTextGetCGColor(fillColor);
NSNumber *strokeWidth = CFDictionaryGetValue(runAttrs, kCTStrokeWidthAttributeName);
对Coretext不熟悉,请问该如何解决
Metadata
Metadata
Assignees
Labels
No labels