Line captions are already implemented in poppler / PDF generator (can't be enabled in okular UI yet, but that's another story).
This adds the drawing code for non-PDF documents.
Looks like this:
TODO:
- obey inline / top setting
- precombine transformation matrix
- if inline, partially spare out main segment
- figure out which font size and color to use
- adjust placement under some conditions (e.g. avoid upside down text)?
Depends on D21248