Function to get coordinates for a document position. Used to compute the tooltip anchor position.
final Offset? Function(int pos) coordsAtPos;