CGFont and CTFont functionality in portable Swift (e.g. Ubuntu, etc)?
问题 Swift on macOS, the import Foundation statement is sufficient to link with CGFont, CTFont and related functions. import Foundation public struct FontMetric { let cgFont: CGFont private let ctFont: CTFont // ... However, for Swift on Ubuntu, the CGFont, CTFont and related functions cause "undeclared type" errors: FontMetric.swift:21:17: error: use of undeclared type 'CGFont' let cgFont: CGFont ^~~~~~ FontMetric.swift:24:25: error: use of undeclared type 'CTFont' private let ctFont: CTFont ^~~~