The CoreText method CTFontGetAdvancesForGlyphs adds the advances for all glyphs of an array of such and returns the sum.
However, if the array consists only of 1 element:
var offset = CCTFontGetAdvancesForGlyphs(myFont, .default, &myGlyph, nil, 1)
is calling the method just performing a simple lookup like when I access a variable, or will it trigger some kind of calculation on each call?
I'm wondering whether I need to store the result in a constant when I need the width of some specific glyphs repeatedly.