I am using CTFontGetBoundingRectsForGlyphs() to find single glyphs width. But it is too slow to call it multiple times per text line. And I ask you is there faster method to check glyph dimensions?
CTFontGetAdvancesForGlyphs()
may be a faster way to find a single glyphs width.
Alternatively, if you're using CTLine
and CTRun
, then CTRunGetAdvances()
and CTRunGetAdvancesPtr()
should give faster results as they're returning cached values.