SkiaKit
SkiaKit copied to clipboard
GetGlyphPositions SkiaSharp implementation in Swift
` func getGlyphPositions(text: String) -> [Point] { var textChar = Character
var n = countGlyphs(str: text)
if n <= 0 {
return [Point]()
}
var positions: [Point] = Array.init (repeating: Point(x:0, y:0), count: Int(n))
if var glyphs = getGlyphs(str: text) {
positions = getGlyphPositions(glyphs: &glyphs)
}
return positions
}`
Could you also review this?
I am sorry i am not raising any pull requests because i am not sure if i have done this correctly.