Skip to content

Instantly share code, notes, and snippets.

View vitsky91's full-sized avatar
😶‍🌫️
Investigate and find

Vitalii Sydorskyi vitsky91

😶‍🌫️
Investigate and find
View GitHub Profile
@vitsky91
vitsky91 / StringToBezierPath.swift
Created February 18, 2022 11:12
Convert String to UIBezierPath using Swift
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)