How can I go from an NSGlyph to a CGGlyph?
let ctGlyph = glyph as CGGlyph
I see that:
typealias CGGlyph = CGFontIndex
typealias CGFontIndex = UInt16
typealias NSGlyph = UInt32
So how do I do the typecast?
I tried:
let ctGlyph = glyph as CGGlyph
but it gives me:
error: 'NSGlyph' is not convertible to 'CGGlyph'
You can't cast, but you can use an initializer: