This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import CoreText | |
import XCPlayground | |
let font = UIFont(name: "HelveticaNeue", size: 46)! // Choose font | |
var allPathes = [CGPath]() | |
var unichars = [UniChar]("i".utf16) //Insert text | |
var glyphs = [CGGlyph](repeating: 0, count: unichars.count) | |
let gotGlyphs = CTFontGetGlyphsForCharacters(font, &unichars, &glyphs, unichars.count) |
NewerOlder