Is font substitution in TextKit (iOS) exposed?

37 Views Asked by At

Is there a way in TextKit to find out about which font has been substituted if a needed glyph was not available in the primary font?

Similar to what CTRun would give me in CoreText. I am fine with the default cascade of the system, but I want to know what font was substituted. I wonder, since in the documentation there is a whole section about "Accessing glyphs" for NSLayoutManager, where I can see functionality to extract glyph IDs, e.g.

func cgGlyph(at glyphIndex: Int) -> CGGlyph

And CGGlyph is only meaningful in the context of a font, it is meaningless stand-alone, so if I do not even know the font, what good is a glyphID? So hence, it would think that there must be this functionality somewhere in TextKit, but where? Thank you for help.

0

There are 0 best solutions below