我正在尝试将一些使用UIFont和CTFont的代码移植到Swift,并且(在Objective中成功地)使用简单的桥接转换从一个转换到另一个,反之亦然。至少以下几点没有:let features = CTFontCopyFeatures(font as CTFont)
错误:“UIFont”不能转换为“CTFont”
我正在尝试将使用NSFont的代码转换为使用CTFont的代码(试图使其成为macOS和iOS的跨平台)。initialize a parameter of type 'NSFont * _Nonnull' with an lvalue of type 'CTFontRef' (aka 'const __CTFont