This is some experimental code from what I discussed in the issue. I added both approaches in this code but really only one solution is sufficient:
An index which points to the TextStyle a particular GlyphPosition came from
or
A reference to custom user data on the TextStyle struct
Note: the way I implemented it, GlyphPosition will have an extra field the size of a reference (8 bytes typically) for the user data. I don't know if this is a dealbreaker for you or not. There may be a way to make that go away if you opt to not supply user data, this article may have some hints.
From #43
This is some experimental code from what I discussed in the issue. I added both approaches in this code but really only one solution is sufficient:
TextStyle
a particularGlyphPosition
came from orTextStyle
structNote: the way I implemented it,
GlyphPosition
will have an extra field the size of a reference (8 bytes typically) for the user data. I don't know if this is a dealbreaker for you or not. There may be a way to make that go away if you opt to not supply user data, this article may have some hints.Let me know what you think!