RMagick Annotate - interline spacing and its relation with the font

Hi,

RMagick Documentation about interline_spacing mentions - “A numeric
value. If positive, inserts additional space between lines. If negative,
removes space between lines. The amount of space inserted or removed
depends on the font.”

The problem is that one can not achieve the exact text as was entered by
the user. One can break lines using a small javascript and the entire
text is being annotated at the server but the line spacing becomes an
issue. As of now its a mere guess to set the interline spacing but as
and when the font size changes the rendered text goes for a toss.

There could be an alternative to fix the line-height at the client but
there doesn’t seem to be any working equation with the interline
spacing.

What could be the possible implementable approaches to address the
problem of interline spacing so that one can get the exact text
appearance rendered out of RMagick as was entered by the user.

Thanks,
Kevin Peterson