class HexaPDF::Layout::Style

def calculated_underline_position

Returns the correct offset from the baseline for the underline.
def calculated_underline_position
  calculated_text_rise +
    font.wrapped_font.underline_position * font.scaling_factor *
    font.pdf_object.glyph_scaling_factor * calculated_font_size -
    calculated_underline_thickness / 2.0
end